mirror of https://github.com/waku-org/nwaku.git
fix: content_script_version_4.nim: migration failed when dropping unexisting constraing (#2672)
This commit is contained in:
parent
a46d4451eb
commit
38f8b08c7c
|
@ -2,7 +2,6 @@ const ContentScriptVersion_4* =
|
|||
"""
|
||||
ALTER TABLE IF EXISTS messages_backup RENAME TO messages;
|
||||
ALTER TABLE messages RENAME TO messages_backup;
|
||||
ALTER TABLE messages_backup DROP CONSTRAINT messageIndex;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS messages (
|
||||
pubsubTopic VARCHAR NOT NULL,
|
||||
|
@ -64,6 +63,8 @@ INSERT INTO messages (
|
|||
storedAt
|
||||
FROM messages_backup;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS i_query ON messages (contentTopic, pubsubTopic, storedAt, id);
|
||||
|
||||
DROP TABLE messages_backup;
|
||||
|
||||
UPDATE version SET version = 4 WHERE version = 3;
|
||||
|
|
Loading…
Reference in New Issue