From b81f4437226d118e7a6531b4f9569642b62ef8cf Mon Sep 17 00:00:00 2001 From: sjaanus Date: Wed, 28 Aug 2024 15:53:57 +0300 Subject: [PATCH] feat: 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..ab77edff22 --- /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); +};