From b02f8005f15b7b8bc8f509ccc8d64b139e350fc9 Mon Sep 17 00:00:00 2001 From: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:42:47 +0100 Subject: [PATCH] migration: flag-trends - add users column (#6254) Add `users` column to per-project trends. --- .../20240215133213-flag-trends-users.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/migrations/20240215133213-flag-trends-users.js diff --git a/src/migrations/20240215133213-flag-trends-users.js b/src/migrations/20240215133213-flag-trends-users.js new file mode 100644 index 0000000000..f23f09996f --- /dev/null +++ b/src/migrations/20240215133213-flag-trends-users.js @@ -0,0 +1,16 @@ +'use strict'; + +exports.up = function(db, cb) { + db.runSql( + ` + ALTER TABLE flag_trends ADD COLUMN IF NOT EXISTS users INTEGER DEFAULT 0; + `, + cb, + ); +}; + +exports.down = function(db, cb) { + db.runSql(` + ALTER TABLE flag_trends DROP COLUMN IF EXISTS users; + `, cb); +};