From f004b37b70530af06852032437fcff091046c1ba Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Mon, 6 May 2024 16:53:21 +0200 Subject: [PATCH 1/4] content_script_version_4: remove line that tried to remove non-existing constraint --- migrations/message_store_postgres/content_script_version_4.nim | 1 - 1 file changed, 1 deletion(-) diff --git a/migrations/message_store_postgres/content_script_version_4.nim b/migrations/message_store_postgres/content_script_version_4.nim index d3a6ea7cb3..3ba04daa9f 100644 --- a/migrations/message_store_postgres/content_script_version_4.nim +++ b/migrations/message_store_postgres/content_script_version_4.nim @@ -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, From 944fde2776646aa57ea671f98de993940eec3b27 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Mon, 6 May 2024 16:57:36 +0200 Subject: [PATCH 2/4] revert-me --- waku/factory/external_config.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/waku/factory/external_config.nim b/waku/factory/external_config.nim index aa5bd7f381..acdca5384e 100644 --- a/waku/factory/external_config.nim +++ b/waku/factory/external_config.nim @@ -616,6 +616,7 @@ proc parseCmdArg*(T: type crypto.PrivateKey, p: string): T = proc completeCmdArg*(T: type crypto.PrivateKey, val: string): seq[string] = return @[] +# change to force image creation in CI proc parseCmdArg*(T: type ProtectedTopic, p: string): T = let elements = p.split(":") if elements.len != 2: From f5913ac06cd38edf9c9c5265e07864040086ecfd Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Mon, 6 May 2024 17:21:11 +0200 Subject: [PATCH 3/4] content_script_version_4: creating index in case doesn't exist --- migrations/message_store_postgres/content_script_version_4.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migrations/message_store_postgres/content_script_version_4.nim b/migrations/message_store_postgres/content_script_version_4.nim index 3ba04daa9f..2f6ff236e5 100644 --- a/migrations/message_store_postgres/content_script_version_4.nim +++ b/migrations/message_store_postgres/content_script_version_4.nim @@ -63,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; From 04ddcaa2063e6239cd320e60ecc4f70cdfe22464 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Mon, 6 May 2024 17:51:51 +0200 Subject: [PATCH 4/4] Revert "revert-me" This reverts commit 944fde2776646aa57ea671f98de993940eec3b27. --- waku/factory/external_config.nim | 1 - 1 file changed, 1 deletion(-) diff --git a/waku/factory/external_config.nim b/waku/factory/external_config.nim index acdca5384e..aa5bd7f381 100644 --- a/waku/factory/external_config.nim +++ b/waku/factory/external_config.nim @@ -616,7 +616,6 @@ proc parseCmdArg*(T: type crypto.PrivateKey, p: string): T = proc completeCmdArg*(T: type crypto.PrivateKey, val: string): seq[string] = return @[] -# change to force image creation in CI proc parseCmdArg*(T: type ProtectedTopic, p: string): T = let elements = p.split(":") if elements.len != 2: