summaryrefslogtreecommitdiffstats
path: root/server/migrations/20180917202533-create-config_x_entry.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/migrations/20180917202533-create-config_x_entry.js')
-rw-r--r--server/migrations/20180917202533-create-config_x_entry.js39
1 files changed, 39 insertions, 0 deletions
diff --git a/server/migrations/20180917202533-create-config_x_entry.js b/server/migrations/20180917202533-create-config_x_entry.js
new file mode 100644
index 0000000..4e32ea9
--- /dev/null
+++ b/server/migrations/20180917202533-create-config_x_entry.js
@@ -0,0 +1,39 @@
+'use strict'
+module.exports = {
+ up: (queryInterface, Sequelize) => {
+ return queryInterface.createTable('config_x_entry', {
+ groupId: {
+ primaryKey: true,
+ allowNull: false,
+ type: Sequelize.INTEGER,
+ onDelete: 'cascade',
+ references: {
+ model: 'configs',
+ key: 'id'
+ }
+ },
+ clientId: {
+ primaryKey: true,
+ allowNull: false,
+ type: Sequelize.INTEGER,
+ onDelete: 'cascade',
+ references: {
+ model: 'entries',
+ key: 'id'
+ }
+ },
+ sortValue: {
+ type: Sequelize.INTEGER
+ },
+ customName: {
+ type: Sequelize.STRING
+ },
+ keyBind: {
+ type: Sequelize.STRING
+ }
+ })
+ },
+ down: (queryInterface, Sequelize) => {
+ return queryInterface.dropTable('config_x_entry')
+ }
+}