Skip to content

A modern, self-hosted backup solution for secure, encrypted backups across local and cloud storage.

chore: adds verbose logging for database logging migration failure

towfiqi3aa6358b27a8
diff --git a/backend/src/index.ts b/backend/src/index.ts
index b06fe16..0985f52 100644
--- a/backend/src/index.ts
+++ b/backend/src/index.ts
@@ -59,12 +59,13 @@ if (isMainModule || isDevelopment) {
console.log('[CORE] Database migrations completed successfully');
}
} catch (error: any) {
- // If tables already exist - skip migration
+ // If tables already exist or columns already exist (edition upgrade) - skip migration
if (
error?.cause?.code === 'SQLITE_ERROR' &&
- error?.cause?.message?.includes('already exists')
+ (error?.cause?.message?.includes('already exists') ||
+ error?.cause?.message?.includes('duplicate column'))
) {
- console.log('[CORE] Database tables already exist, skipping migrations');
+ console.log('[CORE] Database schema already up-to-date, skipping migrations');
} else {
console.error('[CORE] Database migration error:', error);
process.exit(1);