mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 07:05:24 +00:00
test: prove 2.8 to 2.9.0 upgrade is lossless and fix what it caught
This commit is contained in:
1 parent
2ee9b3592c
commit
f779d6a08e
37 files changed
+5184
-377
No files matched your search
+2
-15
@@ -4,7 +4,6 @@ import { promises as fs, readFileSync } from "fs";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { AutoSSLSetup } from "./tls/self-signed.js";
|
||||
import { ensureDatabaseLayerPreupgradeBackup } from "./utils/database-layer-preupgrade-backup.js";
|
||||
import { DatabaseSaveTrigger } from "./utils/database-save-trigger.js";
|
||||
import { SystemCrypto } from "./utils/system-crypto.js";
|
||||
import {
|
||||
@@ -160,20 +159,8 @@ async function provisionLocalDesktopUserIfNeeded(): Promise<void> {
|
||||
await import("./database/db/dialect.js");
|
||||
const databaseDialect = resolveDatabaseDialect();
|
||||
|
||||
// The pre-upgrade backup copies the SQLite file, so there is nothing for it
|
||||
// to do on a client-server engine. Say so rather than no-op silently:
|
||||
// backups are the operator's own responsibility there.
|
||||
if (needsExplicitPersist(databaseDialect)) {
|
||||
ensureDatabaseLayerPreupgradeBackup({ dataDir, version });
|
||||
} else {
|
||||
systemLogger.info(
|
||||
`Skipping pre-upgrade backup on ${databaseDialect} - back up the database yourself`,
|
||||
{
|
||||
operation: "backend_init_db_backup_skipped",
|
||||
dialect: databaseDialect,
|
||||
},
|
||||
);
|
||||
}
|
||||
const { backupBeforeUpgrade } = await import("./boot.js");
|
||||
await backupBeforeUpgrade({ dataDir, version });
|
||||
|
||||
await AutoSSLSetup.initialize();
|
||||
systemLogger.success("SSL setup completed", {
|
||||
|
||||
Reference in new issue
Block a user