Skip to content

Commit c4b687b

Browse files
authored
agent: reset schema after changes (#1690)
1 parent a7b43b1 commit c4b687b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Simplex/Messaging/Agent/Store/SQLite/Migrations/M20240624_snd_secure.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ UPDATE sqlite_master
1717
SET sql = replace(sql, 'sender_key BLOB NOT NULL,', 'sender_key BLOB,')
1818
WHERE name = 'conn_confirmations' AND type = 'table';
1919

20-
PRAGMA writable_schema=0;
20+
PRAGMA writable_schema=RESET;
2121
|]
2222

2323
down_m20240624_snd_secure :: Query
@@ -32,5 +32,5 @@ UPDATE sqlite_master
3232
SET sql = replace(sql, 'sender_key BLOB,', 'sender_key BLOB NOT NULL,')
3333
WHERE name = 'conn_confirmations' AND type = 'table';
3434

35-
PRAGMA writable_schema=0;
35+
PRAGMA writable_schema=RESET;
3636
|]

src/Simplex/Messaging/Agent/Store/SQLite/Migrations/M20250702_conn_invitations_remove_cascade_delete.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SET sql = replace(
1818
)
1919
WHERE name = 'conn_invitations' AND type = 'table';
2020

21-
PRAGMA writable_schema=0;
21+
PRAGMA writable_schema=RESET;
2222
|]
2323

2424
down_m20250702_conn_invitations_remove_cascade_delete :: Query
@@ -34,5 +34,5 @@ SET sql = replace(
3434
)
3535
WHERE name = 'conn_invitations' AND type = 'table';
3636

37-
PRAGMA writable_schema=0;
37+
PRAGMA writable_schema=RESET;
3838
|]

src/Simplex/Messaging/Agent/Store/SQLite/Migrations/M20251230_strict_tables.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ UPDATE sqlite_master
2828
SET sql = replace(sql, 'device_token TEXT NOT NULL', 'device_token BLOB NOT NULL')
2929
WHERE type = 'table' AND name = 'ntf_tokens';
3030

31-
PRAGMA writable_schema=0;
31+
PRAGMA writable_schema=RESET;
3232
|]
3333

3434
down_m20251230_strict_tables :: Query
@@ -48,7 +48,7 @@ UPDATE sqlite_master
4848
SET sql = replace(sql, 'device_token BLOB NOT NULL', 'device_token TEXT NOT NULL')
4949
WHERE type = 'table' AND name = 'ntf_tokens';
5050

51-
PRAGMA writable_schema=0;
51+
PRAGMA writable_schema=RESET;
5252

5353
UPDATE ntf_tokens SET ntf_mode = CAST(ntf_mode as BLOB);
5454

0 commit comments

Comments
 (0)