You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INSERT INTO ps_migration(id, down_migrations) VALUES(2, json_array(json_object('sql', 'DELETE FROM ps_migration WHERE id >= 2', 'params', json_array()), json_object('sql', 'DROP TABLE ps_tx', 'params', json_array()), json_object('sql', 'ALTER TABLE ps_crud DROP COLUMN tx_id', 'params', json_array())));
140
-
")?;
142
+
").into_db_result(local_db)?;
141
143
}
142
144
143
145
if current_version < 3 && target_version >= 3{
@@ -147,7 +149,7 @@ CREATE TABLE ps_kv(key TEXT PRIMARY KEY NOT NULL, value BLOB);
147
149
INSERT INTO ps_kv(key, value) values('client_id', uuid());
148
150
149
151
INSERT INTO ps_migration(id, down_migrations) VALUES(3, json_array(json_object('sql', 'DELETE FROM ps_migration WHERE id >= 3'), json_object('sql', 'DROP TABLE ps_kv')));
150
-
")?;
152
+
").into_db_result(local_db)?;
151
153
}
152
154
153
155
if current_version < 4 && target_version >= 4{
@@ -167,7 +169,7 @@ VALUES(4,
167
169
json_object('sql', 'ALTER TABLE ps_buckets DROP COLUMN op_checksum'),
168
170
json_object('sql', 'ALTER TABLE ps_buckets DROP COLUMN remove_operations')
169
171
));
170
-
")?;
172
+
").into_db_result(local_db)?;
171
173
}
172
174
173
175
if current_version < 5 && target_version >= 5{
@@ -286,7 +288,8 @@ VALUES(5,
286
288
json_object('sql', 'DELETE FROM ps_migration WHERE id >= 5')
287
289
));
288
290
",
289
-
)?;
291
+
)
292
+
.into_db_result(local_db)?;
290
293
}
291
294
292
295
if current_version < 6 && target_version >= 6{
@@ -295,15 +298,17 @@ VALUES(5,
295
298
apply_v035_fix(local_db)?;
296
299
}
297
300
298
-
local_db.exec_safe(
299
-
"\
301
+
local_db
302
+
.exec_safe(
303
+
"\
300
304
INSERT INTO ps_migration(id, down_migrations)
301
305
VALUES(6,
302
306
json_array(
303
307
json_object('sql', 'DELETE FROM ps_migration WHERE id >= 6')
304
308
));
305
309
",
306
-
)?;
310
+
)
311
+
.into_db_result(local_db)?;
307
312
}
308
313
309
314
if current_version < 7 && target_version >= 7{
@@ -325,7 +330,7 @@ json_object('sql', 'DELETE FROM ps_migration WHERE id >= 7')
0 commit comments