summaryrefslogtreecommitdiffstats
path: root/server/migrations
diff options
context:
space:
mode:
authorChristian Hofmaier2018-08-05 01:48:06 +0200
committerChristian Hofmaier2018-08-05 01:48:06 +0200
commit0d653469ea504bd8f638d0534e20b69ce977d319 (patch)
tree54125f18c9400052b8fd3b9635c6f362b8647d9d /server/migrations
parent[permissions] add permission management (diff)
parent[webapp/groups] add generic table actions component for search and pagination... (diff)
downloadbas-0d653469ea504bd8f638d0534e20b69ce977d319.tar.gz
bas-0d653469ea504bd8f638d0534e20b69ce977d319.tar.xz
bas-0d653469ea504bd8f638d0534e20b69ce977d319.zip
merge
Diffstat (limited to 'server/migrations')
-rw-r--r--server/migrations/20180715193710-create-backend.js17
-rw-r--r--server/migrations/20180717132233-create-group.js3
-rw-r--r--server/migrations/20180717132333-create-client.js3
-rw-r--r--server/migrations/20180717202333-create-group_x_group.js2
-rw-r--r--server/migrations/20180717202533-create-group_x_client.js2
5 files changed, 26 insertions, 1 deletions
diff --git a/server/migrations/20180715193710-create-backend.js b/server/migrations/20180715193710-create-backend.js
index e89362e..98f5476 100644
--- a/server/migrations/20180715193710-create-backend.js
+++ b/server/migrations/20180715193710-create-backend.js
@@ -15,7 +15,22 @@ module.exports = {
type: Sequelize.STRING
},
credentials: {
- type: Sequelize.STRING(2048)
+ allowNull: false,
+ type: Sequelize.STRING(2048),
+ defaultValue: '[]'
+ },
+ groups: {
+ allowNull: false,
+ type: Sequelize.STRING(4096),
+ defaultValue: '[]'
+ },
+ clients: {
+ allowNull: false,
+ type: Sequelize.STRING(4096),
+ defaultValue: '[]'
+ },
+ sync: {
+ type: Sequelize.STRING(1024)
}
})
},
diff --git a/server/migrations/20180717132233-create-group.js b/server/migrations/20180717132233-create-group.js
index 720a1e7..49088dd 100644
--- a/server/migrations/20180717132233-create-group.js
+++ b/server/migrations/20180717132233-create-group.js
@@ -10,6 +10,9 @@ module.exports = {
},
name: {
type: Sequelize.STRING
+ },
+ description: {
+ type: Sequelize.STRING(2048)
}
})
},
diff --git a/server/migrations/20180717132333-create-client.js b/server/migrations/20180717132333-create-client.js
index 79552c4..d374b22 100644
--- a/server/migrations/20180717132333-create-client.js
+++ b/server/migrations/20180717132333-create-client.js
@@ -11,6 +11,9 @@ module.exports = {
name: {
type: Sequelize.STRING
},
+ description: {
+ type: Sequelize.STRING(2048)
+ },
ip: {
type: Sequelize.STRING
},
diff --git a/server/migrations/20180717202333-create-group_x_group.js b/server/migrations/20180717202333-create-group_x_group.js
index 4263f9a..298c2fb 100644
--- a/server/migrations/20180717202333-create-group_x_group.js
+++ b/server/migrations/20180717202333-create-group_x_group.js
@@ -6,6 +6,7 @@ module.exports = {
primaryKey: true,
allowNull: false,
type: Sequelize.INTEGER,
+ onDelete: 'cascade',
references: {
model: 'groups',
key: 'id'
@@ -15,6 +16,7 @@ module.exports = {
primaryKey: true,
allowNull: false,
type: Sequelize.INTEGER,
+ onDelete: 'cascade',
references: {
model: 'groups',
key: 'id'
diff --git a/server/migrations/20180717202533-create-group_x_client.js b/server/migrations/20180717202533-create-group_x_client.js
index e3bd490..7564618 100644
--- a/server/migrations/20180717202533-create-group_x_client.js
+++ b/server/migrations/20180717202533-create-group_x_client.js
@@ -6,6 +6,7 @@ module.exports = {
primaryKey: true,
allowNull: false,
type: Sequelize.INTEGER,
+ onDelete: 'cascade',
references: {
model: 'groups',
key: 'id'
@@ -15,6 +16,7 @@ module.exports = {
primaryKey: true,
allowNull: false,
type: Sequelize.INTEGER,
+ onDelete: 'cascade',
references: {
model: 'clients',
key: 'id'