mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-03 14:33:12 +00:00
* Add postgres_driver/migrations.nim * Postgres and archive logic adaptation to the migration implementation * libwaku: adapt node_lifecycle_request.nim to migration refactoring * test_app.nim: add more detail for test that only fails in CI * postgres migrations: store the migration scripts inside the resulting wakunode binary instead of external .sql files.
21 lines
478 B
Nim
21 lines
478 B
Nim
const ContentScriptVersion_1* = """
|
|
CREATE TABLE IF NOT EXISTS messages (
|
|
pubsubTopic VARCHAR NOT NULL,
|
|
contentTopic VARCHAR NOT NULL,
|
|
payload VARCHAR,
|
|
version INTEGER NOT NULL,
|
|
timestamp BIGINT NOT NULL,
|
|
id VARCHAR NOT NULL,
|
|
messageHash VARCHAR NOT NULL,
|
|
storedAt BIGINT NOT NULL,
|
|
CONSTRAINT messageIndex PRIMARY KEY (messageHash)
|
|
);
|
|
|
|
CREATE TABLE iF NOT EXISTS version (
|
|
version INTEGER NOT NULL
|
|
);
|
|
|
|
INSERT INTO version (version) VALUES(1);
|
|
|
|
"""
|