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