From 8e8af9851b04e10a5afcd56b569d59d02191ec1a Mon Sep 17 00:00:00 2001 From: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com> Date: Fri, 16 Feb 2024 00:11:38 +0100 Subject: [PATCH] migration: flag-trends users - add users column --- .../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 000000000000..f23f09996f7c --- /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); +};