From 5a1f1a00ba352cb827d6eb37fe83b397fa1a178e Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Fri, 10 Jan 2025 13:25:09 +0100 Subject: [PATCH] feat: migration for unique connections (#9076) --- .../20250109150818-unique-connections-table.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/migrations/20250109150818-unique-connections-table.js diff --git a/src/migrations/20250109150818-unique-connections-table.js b/src/migrations/20250109150818-unique-connections-table.js new file mode 100644 index 0000000000..6429b77a29 --- /dev/null +++ b/src/migrations/20250109150818-unique-connections-table.js @@ -0,0 +1,14 @@ +exports.up = function(db, cb) { + db.runSql(` + CREATE TABLE IF NOT EXISTS unique_connections + ( + id VARCHAR(255) PRIMARY KEY NOT NULL, + updated_at TIMESTAMP DEFAULT now(), + hll BYTEA NOT NULL, + ); +`, cb) +}; + +exports.down = function(db, cb) { + db.runSql(`DROP TABLE unique_connections;`, cb); +};