require fewer network interactions during build
This commit is contained in:
@@ -511,7 +511,6 @@ function openAndMigrateDatabase(
|
||||
let db: Database | undefined;
|
||||
|
||||
// First, we try to open the database without any cipher changes
|
||||
try {
|
||||
db = new SQL(filePath, {
|
||||
readonly,
|
||||
});
|
||||
@@ -520,12 +519,6 @@ function openAndMigrateDatabase(
|
||||
migrateSchemaVersion(db);
|
||||
|
||||
return db;
|
||||
} catch (error) {
|
||||
if (db) {
|
||||
db.close();
|
||||
}
|
||||
logger.info('migrateDatabase: Migration without cipher change failed');
|
||||
}
|
||||
|
||||
// If that fails, we try to open the database with 3.x compatibility to extract the
|
||||
// user_version (previously stored in schema_version, blown away by cipher_migrate).
|
||||
|
Reference in New Issue
Block a user