From f12b13c40f16f151671dcf54526558d754a163f8 Mon Sep 17 00:00:00 2001 From: les Date: Mon, 31 Aug 2020 16:43:13 +0200 Subject: [PATCH] schema migration --- .../migrations/20200831143500-tag_confirmation.js | 13 +++++++++++++ .../migrations/20200831144116-place_confirmation.js | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 server/migrations/20200831143500-tag_confirmation.js create mode 100644 server/migrations/20200831144116-place_confirmation.js diff --git a/server/migrations/20200831143500-tag_confirmation.js b/server/migrations/20200831143500-tag_confirmation.js new file mode 100644 index 00000000..df758171 --- /dev/null +++ b/server/migrations/20200831143500-tag_confirmation.js @@ -0,0 +1,13 @@ +module.exports = { + up: (queryInterface, Sequelize) => { + return queryInterface.addColumn('tags', 'confirmed', { + type: Sequelize.BOOLEAN, + defaultValue: true, + allowNull: false + }) + }, + + down: (queryInterface, Sequelize) => { + return queryInterface.removeColumn('tags', 'confirmed') + } +} diff --git a/server/migrations/20200831144116-place_confirmation.js b/server/migrations/20200831144116-place_confirmation.js new file mode 100644 index 00000000..38a23b32 --- /dev/null +++ b/server/migrations/20200831144116-place_confirmation.js @@ -0,0 +1,13 @@ +module.exports = { + up: (queryInterface, Sequelize) => { + return queryInterface.addColumn('places', 'confirmed', { + type: Sequelize.BOOLEAN, + defaultValue: true, + allowNull: false + }) + }, + + down: (queryInterface, Sequelize) => { + return queryInterface.removeColumn('places', 'confirmed') + } +}