removed foreign keys PRAGMAs since foreign key constraints are not used anymore

This commit is contained in:
zadam 2019-11-30 10:41:53 +01:00
parent d0e6be3e0c
commit 995ebbf577
2 changed files with 0 additions and 9 deletions

View File

@ -43,9 +43,6 @@ async function migrate() {
try {
log.info("Attempting migration to version " + mig.dbVersion);
// needs to happen outside of the transaction (otherwise it's a NO-OP)
await sql.execute("PRAGMA foreign_keys = OFF");
await sql.transactional(async () => {
if (mig.type === 'sql') {
const migrationSql = fs.readFileSync(resourceDir.MIGRATIONS_DIR + "/" + mig.file).toString('utf8');
@ -76,10 +73,6 @@ async function migrate() {
utils.crash();
}
finally {
// make sure foreign keys are enabled even if migration script disables them
await sql.execute("PRAGMA foreign_keys = ON");
}
}
if (await sqlInit.isDbUpToDate()) {

View File

@ -57,8 +57,6 @@ async function initDbConnection() {
return;
}
await sql.execute("PRAGMA foreign_keys = ON");
const currentDbVersion = await getDbVersion();
if (currentDbVersion > appInfo.dbVersion) {