mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-30 14:15:55 +00:00
core: reset schema after changes (#6545)
* core: reset schema after changes * update simplexmq
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|]
|
||||
|
||||
@@ -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;
|
||||
|]
|
||||
|
||||
@@ -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;
|
||||
|]
|
||||
|
||||
@@ -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;
|
||||
|]
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user