From 4d2d1de3898183c6447601d3cd2448fc0832269b Mon Sep 17 00:00:00 2001 From: Sam Machin Date: Wed, 3 Jun 2026 18:04:54 +0100 Subject: [PATCH] Fix/db schema versions (#555) * add notes on version to number mapping, no code change here * typos --- db/upgrade-jambonz-db.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/db/upgrade-jambonz-db.js b/db/upgrade-jambonz-db.js index 1e43498..7788fdb 100644 --- a/db/upgrade-jambonz-db.js +++ b/db/upgrade-jambonz-db.js @@ -37,6 +37,12 @@ if (rejectUnauthorized !== undefined || sslFilesProvided) { }; } +/* The mapping of version numbers to schema ints here is a little broken its fine for 0.x.x releasees but has been changes in the 10.x branch, so take note of the differece. +The schema version is created by taking the minor number and multiplying it by 100 then concatenating the patch verison so 0.5.6 becomes 5006, major is asumed to always be zero for this line +This should be followed even if a 0.10.x release was ever made as that would then become 1000x +This will also break if the patch version is greater than 9 eg 0.9.10 would become 90010, preventing a 0.10.x +If we ever get to 0.9.9 and have more schema changes this needs some careful though. +*/ const sql = { '7006': [