From 2251da970e04a229afd5df712b2ef00af1d480b7 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Mon, 5 Jan 2026 22:10:51 +0000 Subject: [PATCH] core: reset schema after changes (#6545) * core: reset schema after changes * update simplexmq --- cabal.project | 2 +- scripts/nix/sha256map.nix | 2 +- .../Chat/Store/SQLite/Migrations/M20240226_users_restrict.hs | 4 ++-- .../SQLite/Migrations/M20241023_chat_item_autoincrement_id.hs | 4 ++-- .../M20250702_contact_requests_remove_cascade_delete.hs | 4 ++-- .../Store/SQLite/Migrations/M20251017_chat_tags_cascade.hs | 4 ++-- .../Chat/Store/SQLite/Migrations/M20251230_strict_tables.hs | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cabal.project b/cabal.project index e5d7464ece..63e85073a1 100644 --- a/cabal.project +++ b/cabal.project @@ -12,7 +12,7 @@ constraints: zip +disable-bzip2 +disable-zstd source-repository-package type: git location: https://github.com/simplex-chat/simplexmq.git - tag: a7b43b1a3e204759d4b7ad60928fa897b1600654 + tag: c4b687ba644d8f0581a9f4317b6211c493a8d685 source-repository-package type: git diff --git a/scripts/nix/sha256map.nix b/scripts/nix/sha256map.nix index 16454f63d1..fdf8735197 100644 --- a/scripts/nix/sha256map.nix +++ b/scripts/nix/sha256map.nix @@ -1,5 +1,5 @@ { - "https://github.com/simplex-chat/simplexmq.git"."a7b43b1a3e204759d4b7ad60928fa897b1600654" = "169vjn5gyw42cmak6kwyl27zm57il43khnlj40zjwjw7cldkzdzi"; + "https://github.com/simplex-chat/simplexmq.git"."c4b687ba644d8f0581a9f4317b6211c493a8d685" = "0s6wnmxjjr3fgfayyn0rdgwkqsg4z6da6ha0sq78mavvplwhg21m"; "https://github.com/simplex-chat/hs-socks.git"."a30cc7a79a08d8108316094f8f2f82a0c5e1ac51" = "0yasvnr7g91k76mjkamvzab2kvlb1g5pspjyjn2fr6v83swjhj38"; "https://github.com/simplex-chat/direct-sqlcipher.git"."f814ee68b16a9447fbb467ccc8f29bdd3546bfd9" = "1ql13f4kfwkbaq7nygkxgw84213i0zm7c1a8hwvramayxl38dq5d"; "https://github.com/simplex-chat/sqlcipher-simple.git"."a46bd361a19376c5211f1058908fc0ae6bf42446" = "1z0r78d8f0812kxbgsm735qf6xx8lvaz27k1a0b4a2m0sshpd5gl"; diff --git a/src/Simplex/Chat/Store/SQLite/Migrations/M20240226_users_restrict.hs b/src/Simplex/Chat/Store/SQLite/Migrations/M20240226_users_restrict.hs index eb1bc2bfea..150cccd900 100644 --- a/src/Simplex/Chat/Store/SQLite/Migrations/M20240226_users_restrict.hs +++ b/src/Simplex/Chat/Store/SQLite/Migrations/M20240226_users_restrict.hs @@ -14,7 +14,7 @@ UPDATE sqlite_master SET sql = replace(sql, 'ON DELETE CASCADE', 'ON DELETE RESTRICT') WHERE name = 'users' AND type = 'table'; -PRAGMA writable_schema=0; +PRAGMA writable_schema=RESET; |] down_m20240226_users_restrict :: Query @@ -26,5 +26,5 @@ UPDATE sqlite_master SET sql = replace(sql, 'ON DELETE RESTRICT', 'ON DELETE CASCADE') WHERE name = 'users' AND type = 'table'; -PRAGMA writable_schema=0; +PRAGMA writable_schema=RESET; |] diff --git a/src/Simplex/Chat/Store/SQLite/Migrations/M20241023_chat_item_autoincrement_id.hs b/src/Simplex/Chat/Store/SQLite/Migrations/M20241023_chat_item_autoincrement_id.hs index 03b5c40ed3..2764b60850 100644 --- a/src/Simplex/Chat/Store/SQLite/Migrations/M20241023_chat_item_autoincrement_id.hs +++ b/src/Simplex/Chat/Store/SQLite/Migrations/M20241023_chat_item_autoincrement_id.hs @@ -16,7 +16,7 @@ PRAGMA writable_schema=1; UPDATE sqlite_master SET sql = replace(sql, 'INTEGER PRIMARY KEY', 'INTEGER PRIMARY KEY AUTOINCREMENT') WHERE name = 'chat_items' AND type = 'table'; -PRAGMA writable_schema=0; +PRAGMA writable_schema=RESET; |] down_m20241023_chat_item_autoincrement_id :: Query @@ -30,5 +30,5 @@ UPDATE sqlite_master SET sql = replace(sql, 'INTEGER PRIMARY KEY AUTOINCREMENT', 'INTEGER PRIMARY KEY') WHERE name = 'chat_items' AND type = 'table'; -PRAGMA writable_schema=0; +PRAGMA writable_schema=RESET; |] diff --git a/src/Simplex/Chat/Store/SQLite/Migrations/M20250702_contact_requests_remove_cascade_delete.hs b/src/Simplex/Chat/Store/SQLite/Migrations/M20250702_contact_requests_remove_cascade_delete.hs index c758a962cd..5a4d91c826 100644 --- a/src/Simplex/Chat/Store/SQLite/Migrations/M20250702_contact_requests_remove_cascade_delete.hs +++ b/src/Simplex/Chat/Store/SQLite/Migrations/M20250702_contact_requests_remove_cascade_delete.hs @@ -22,7 +22,7 @@ SET sql = replace( ) WHERE name = 'contact_requests' AND type = 'table'; -PRAGMA writable_schema=0; +PRAGMA writable_schema=RESET; |] down_m20250702_contact_requests_remove_cascade_delete :: Query @@ -42,5 +42,5 @@ SET sql = replace( ) WHERE name = 'contact_requests' AND type = 'table'; -PRAGMA writable_schema=0; +PRAGMA writable_schema=RESET; |] diff --git a/src/Simplex/Chat/Store/SQLite/Migrations/M20251017_chat_tags_cascade.hs b/src/Simplex/Chat/Store/SQLite/Migrations/M20251017_chat_tags_cascade.hs index 1f82831404..bda307307d 100644 --- a/src/Simplex/Chat/Store/SQLite/Migrations/M20251017_chat_tags_cascade.hs +++ b/src/Simplex/Chat/Store/SQLite/Migrations/M20251017_chat_tags_cascade.hs @@ -14,7 +14,7 @@ UPDATE sqlite_master SET sql = replace(sql, 'user_id INTEGER REFERENCES users', 'user_id INTEGER REFERENCES users ON DELETE CASCADE') WHERE name = 'chat_tags' AND type = 'table'; -PRAGMA writable_schema=0; +PRAGMA writable_schema=RESET; |] down_m20251017_chat_tags_cascade :: Query @@ -26,5 +26,5 @@ UPDATE sqlite_master SET sql = replace(sql, 'user_id INTEGER REFERENCES users ON DELETE CASCADE', 'user_id INTEGER REFERENCES users') WHERE name = 'chat_tags' AND type = 'table'; -PRAGMA writable_schema=0; +PRAGMA writable_schema=RESET; |] diff --git a/src/Simplex/Chat/Store/SQLite/Migrations/M20251230_strict_tables.hs b/src/Simplex/Chat/Store/SQLite/Migrations/M20251230_strict_tables.hs index be92da8f5e..760b5f8073 100644 --- a/src/Simplex/Chat/Store/SQLite/Migrations/M20251230_strict_tables.hs +++ b/src/Simplex/Chat/Store/SQLite/Migrations/M20251230_strict_tables.hs @@ -34,7 +34,7 @@ SET sql = CASE END WHERE type = 'table' AND name != 'sqlite_sequence'; -PRAGMA writable_schema=0; +PRAGMA writable_schema=RESET; |] down_m20251230_strict_tables :: Query @@ -58,7 +58,7 @@ UPDATE sqlite_master SET sql = replace(sql, 'local_alias TEXT DEFAULT', 'local_alias DEFAULT') WHERE type = 'table' AND name = 'connections'; -PRAGMA writable_schema=0; +PRAGMA writable_schema=RESET; UPDATE group_members SET member_role = CAST(member_role as BLOB),