Release v2.6.22

This commit is contained in:
2026-08-09 13:06:02 +01:00
parent c36b9122c9
commit 6d8bf0f5f0
8 changed files with 154 additions and 12 deletions
+3 -2
View File
@@ -1,5 +1,5 @@
const { version: appVersion } = require('#root/package.json');
const { compareVersions, detectSchemaVersion, recordSchemaVersion, runMigrations } = require('./migrations');
const { compareVersions, detectSchemaVersion, getPendingMigrations, recordSchemaVersion, runMigrations } = require('./migrations');
// Snapshot only: keep this file aligned with the current schema state.
async function ensureSchema(pool, options) {
@@ -16,7 +16,8 @@ async function ensureSchema(pool, options) {
try {
const currentVersion = await detectSchemaVersion(pool);
const updateRequired = compareVersions(currentVersion, appVersion) < 0;
const pendingMigrations = await getPendingMigrations(pool, { currentVersion: currentVersion });
const updateRequired = pendingMigrations.length > 0;
console.info('[schema] previous=' + currentVersion + ' current=' + appVersion + ' update=' + (updateRequired ? 'yes' : 'no'));