From 5b6a26a82843b1e5d7eb4dfc22566bd4645cfaac Mon Sep 17 00:00:00 2001 From: David Leek Date: Mon, 11 Dec 2023 14:58:23 +0100 Subject: [PATCH] chore: migration for features created by (#5593) Contains the migration that adds the column created_by to `features` --- .../20231211121444-features-created-by.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/migrations/20231211121444-features-created-by.js diff --git a/src/migrations/20231211121444-features-created-by.js b/src/migrations/20231211121444-features-created-by.js new file mode 100644 index 0000000000..f7929f0656 --- /dev/null +++ b/src/migrations/20231211121444-features-created-by.js @@ -0,0 +1,19 @@ +'use strict'; + +exports.up = function (db, callback) { + db.runSql( + ` + ALTER TABLE features ADD COLUMN IF NOT EXISTS created_by INTEGER; + `, + callback, + ); +}; + +exports.down = function (db, callback) { + db.runSql( + ` + ALTER TABLE features DROP COLUMN IF EXISTS created_by; + `, + callback, + ); +};