From 4b051726544f89c1d8c9085a54e8579d6ec56991 Mon Sep 17 00:00:00 2001 From: Fredrik Oseberg Date: Mon, 9 Aug 2021 14:41:20 +0200 Subject: [PATCH] fix: add migration --- ...0809124009-add-health-rating-to-project.js | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/migrations/20210809124009-add-health-rating-to-project.js diff --git a/src/migrations/20210809124009-add-health-rating-to-project.js b/src/migrations/20210809124009-add-health-rating-to-project.js new file mode 100644 index 0000000000..cc9a325c91 --- /dev/null +++ b/src/migrations/20210809124009-add-health-rating-to-project.js @@ -0,0 +1,21 @@ +exports.up = function(db, cb) { + db.runSql( + ` + ALTER TABLE projects ADD COLUMN health integer DEFAULT 100; + `, + cb, + ); +}; + +exports.down = function(db, cb) { + db.runSql( + ` + ALTER TABLE projects DROP COLUMN health; + `, + cb, + ); +}; + +exports._meta = { + version: 1, +};