diff --git a/src/migrations/20230224093446-drop-createdBy-from-notifications-table.js b/src/migrations/20230224093446-drop-createdBy-from-notifications-table.js new file mode 100644 index 0000000000..96d33233b7 --- /dev/null +++ b/src/migrations/20230224093446-drop-createdBy-from-notifications-table.js @@ -0,0 +1,21 @@ +'use strict'; + +exports.up = function (db, cb) { + db.runSql( + ` + ALTER TABLE notifications + DROP COLUMN IF EXISTS created_by; + `, + cb, + ); +}; + +exports.down = function (db, cb) { + db.runSql( + ` + ALTER TABLE notifications + ADD COLUMN IF NOT EXISTS created_by INTEGER REFERENCES users (id); + `, + cb, + ); +};