fix: store refresh-at as string type, not date type, for sqlx autotyping
This commit is contained in:
parent
4a0ed99329
commit
6d6018aa32
2 changed files with 17 additions and 1 deletions
|
|
@ -1,5 +1,12 @@
|
|||
-- foreign_keys can only up/down outside of transactions
|
||||
-- so we first pre-commit the one started by sqlx...
|
||||
COMMIT TRANSACTION;
|
||||
|
||||
-- turn off foreign keys...
|
||||
PRAGMA foreign_keys=OFF;
|
||||
|
||||
-- start our own transaction...
|
||||
BEGIN TRANSACTION;
|
||||
create table if not exists new_contacts (
|
||||
id integer primary key autoincrement,
|
||||
birthday text,
|
||||
|
|
@ -16,4 +23,12 @@ insert into new_contacts (
|
|||
drop table contacts;
|
||||
alter table new_contacts rename to contacts;
|
||||
PRAGMA foreign_key_check;
|
||||
|
||||
-- commit our own transaction...
|
||||
COMMIT TRANSACTION;
|
||||
|
||||
-- put our own pragmas back...
|
||||
PRAGMA foreign_keys=ON;
|
||||
|
||||
-- and start a dummy transaction so sqlx's COMMIT doesn't explode
|
||||
BEGIN TRANSACTION;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue