summaryrefslogtreecommitdiffstats
path: root/server/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'server/migrations')
-rw-r--r--server/migrations/20190307051433-create-conflict.js19
-rw-r--r--server/migrations/20190307051633-create-conflict_x_object.js25
2 files changed, 44 insertions, 0 deletions
diff --git a/server/migrations/20190307051433-create-conflict.js b/server/migrations/20190307051433-create-conflict.js
new file mode 100644
index 0000000..c5630dc
--- /dev/null
+++ b/server/migrations/20190307051433-create-conflict.js
@@ -0,0 +1,19 @@
+'use strict'
+module.exports = {
+ up: (queryInterface, Sequelize) => {
+ return queryInterface.createTable('conflicts', {
+ id: {
+ allowNull: false,
+ autoIncrement: true,
+ primaryKey: true,
+ type: Sequelize.INTEGER
+ },
+ description: {
+ type: Sequelize.STRING
+ }
+ })
+ },
+ down: (queryInterface, Sequelize) => {
+ return queryInterface.dropTable('conflicts')
+ }
+}
diff --git a/server/migrations/20190307051633-create-conflict_x_object.js b/server/migrations/20190307051633-create-conflict_x_object.js
new file mode 100644
index 0000000..bead43f
--- /dev/null
+++ b/server/migrations/20190307051633-create-conflict_x_object.js
@@ -0,0 +1,25 @@
+'use strict'
+module.exports = {
+ up: (queryInterface, Sequelize) => {
+ return queryInterface.createTable('conflict_x_object', {
+ id: {
+ allowNull: false,
+ autoIncrement: true,
+ primaryKey: true,
+ type: Sequelize.INTEGER
+ },
+ conflictId: {
+ type: Sequelize.INTEGER
+ },
+ objectType: {
+ type: Sequelize.STRING
+ },
+ objectId: {
+ type: Sequelize.INTEGER
+ }
+ })
+ },
+ down: (queryInterface, Sequelize) => {
+ return queryInterface.dropTable('conflict_x_object')
+ }
+}