From 3188f991f444c4fd09ff6261bcabc56db905e21d Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Wed, 28 Aug 2024 16:27:09 +0300 Subject: [PATCH] feat: start tracking user first login migration (#8006) Start tracking user first login. --- .../20240828154255-user-first-seen-at.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/migrations/20240828154255-user-first-seen-at.js diff --git a/src/migrations/20240828154255-user-first-seen-at.js b/src/migrations/20240828154255-user-first-seen-at.js new file mode 100644 index 0000000000..90cf6d7a00 --- /dev/null +++ b/src/migrations/20240828154255-user-first-seen-at.js @@ -0,0 +1,18 @@ +'use strict'; + +exports.up = function (db, cb) { + db.runSql( + ` + ALTER TABLE users ADD COLUMN first_seen_at TIMESTAMP WITHOUT TIME ZONE; + `, + cb, + ); +}; + +exports.down = function (db, cb) { + db.runSql( + ` + ALTER TABLE users DROP COLUMN first_seen_at; + `, + cb); +};