summaryrefslogtreecommitdiffstats
path: root/server/migrations
diff options
context:
space:
mode:
authorUdo Walter2018-07-30 02:23:29 +0200
committerUdo Walter2018-07-30 02:23:29 +0200
commit32cd36c95f02145edc0784f5c58420574c610777 (patch)
treec996b248146e88aa504b4511260499f1efa16119 /server/migrations
parentmerge (diff)
downloadbas-32cd36c95f02145edc0784f5c58420574c610777.tar.gz
bas-32cd36c95f02145edc0784f5c58420574c610777.tar.xz
bas-32cd36c95f02145edc0784f5c58420574c610777.zip
[server/migrations] add ondelete cascade to group_x_group and group_x_client
Diffstat (limited to 'server/migrations')
-rw-r--r--server/migrations/20180717202333-create-group_x_group.js2
-rw-r--r--server/migrations/20180717202533-create-group_x_client.js2
2 files changed, 4 insertions, 0 deletions
diff --git a/server/migrations/20180717202333-create-group_x_group.js b/server/migrations/20180717202333-create-group_x_group.js
index 4263f9a..a40278d 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..2330cdb 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'