AppDbUpdater: Do not turn off foreign keys per default

This commit is contained in:
2024-02-29 02:10:57 +01:00
parent 3b94875a7f
commit 614e0010fd
2 changed files with 0 additions and 3 deletions

View File

@ -73,7 +73,6 @@ namespace Elwig.Helpers {
await AppDbContext.ExecuteBatch(cnx, """ await AppDbContext.ExecuteBatch(cnx, """
PRAGMA locking_mode = EXCLUSIVE; PRAGMA locking_mode = EXCLUSIVE;
PRAGMA foreign_keys = OFF;
BEGIN EXCLUSIVE; BEGIN EXCLUSIVE;
"""); """);
foreach (var script in toExecute) { foreach (var script in toExecute) {
@ -87,7 +86,6 @@ namespace Elwig.Helpers {
await AppDbContext.ExecuteBatch(cnx, $""" await AppDbContext.ExecuteBatch(cnx, $"""
COMMIT; COMMIT;
PRAGMA foreign_keys = ON;
VACUUM; VACUUM;
PRAGMA schema_version = {toVersion * 100 + VersionOffset}; PRAGMA schema_version = {toVersion * 100 + VersionOffset};
"""); """);

View File

@ -84,7 +84,6 @@ UPDATE area_commitment SET cultid = NULL WHERE cultid = 'N';
DELETE FROM wine_cultivation WHERE cultid = 'N'; DELETE FROM wine_cultivation WHERE cultid = 'N';
UPDATE wine_cultivation SET cultid = 'B', name = 'Bio', description = 'AT-BIO-302' WHERE cultid = 'BIO'; UPDATE wine_cultivation SET cultid = 'B', name = 'Bio', description = 'AT-BIO-302' WHERE cultid = 'BIO';
UPDATE wine_cultivation SET description = 'Kontrollierte Integrierte Produktion' WHERE cultid = 'KIP'; UPDATE wine_cultivation SET description = 'Kontrollierte Integrierte Produktion' WHERE cultid = 'KIP';
UPDATE area_commitment SET cultid = 'B' WHERE cultid = 'BIO';
UPDATE area_commitment SET cultid = 'B', vtrgid = SUBSTR(vtrgid, 1, 2) WHERE vtrgid LIKE '__B'; UPDATE area_commitment SET cultid = 'B', vtrgid = SUBSTR(vtrgid, 1, 2) WHERE vtrgid LIKE '__B';
UPDATE area_commitment SET cultid = 'B' WHERE vtrgid LIKE '__HU'; UPDATE area_commitment SET cultid = 'B' WHERE vtrgid LIKE '__HU';