mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-11 13:15:05 +00:00
core: reset schema after changes (#6545)
* core: reset schema after changes * update simplexmq
This commit is contained in:
@@ -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;
|
||||
|]
|
||||
|
||||
+2
-2
@@ -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