summaryrefslogtreecommitdiffstats
path: root/server/migrations/20180809013230-create-role_x_group.js
diff options
context:
space:
mode:
authorChristian Hofmaier2018-08-10 02:28:51 +0200
committerChristian Hofmaier2018-08-10 02:28:51 +0200
commit79966027428a7d9e1425c63777647e53c9167066 (patch)
treebe23858c24b4ffedd19a6ec188fc5eb87a9c6090 /server/migrations/20180809013230-create-role_x_group.js
parent[server/config] Add server configs. (diff)
downloadbas-79966027428a7d9e1425c63777647e53c9167066.tar.gz
bas-79966027428a7d9e1425c63777647e53c9167066.tar.xz
bas-79966027428a7d9e1425c63777647e53c9167066.zip
[permissions] Add recursive group selection + tables changed to search tables
Role Table has now a new column recursiveGroups to display if recursive selection is wanted Roles and Permissions can now have longer descriptions Data-Tables are now Udos Search-Tables
Diffstat (limited to 'server/migrations/20180809013230-create-role_x_group.js')
-rw-r--r--server/migrations/20180809013230-create-role_x_group.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/server/migrations/20180809013230-create-role_x_group.js b/server/migrations/20180809013230-create-role_x_group.js
new file mode 100644
index 0000000..a6dd792
--- /dev/null
+++ b/server/migrations/20180809013230-create-role_x_group.js
@@ -0,0 +1,30 @@
+'use strict'
+module.exports = {
+ up: (queryInterface, Sequelize) => {
+ return queryInterface.createTable('role_x_group', {
+ roleId: {
+ primaryKey: true,
+ allowNull: false,
+ type: Sequelize.INTEGER,
+ onDelete: 'cascade',
+ references: {
+ model: 'roles',
+ key: 'id'
+ }
+ },
+ groupId: {
+ primaryKey: true,
+ allowNull: false,
+ type: Sequelize.INTEGER,
+ onDelete: 'cascade',
+ references: {
+ model: 'groups',
+ key: 'id'
+ }
+ }
+ })
+ },
+ down: (queryInterface, Sequelize) => {
+ return queryInterface.dropTable('role_x_group')
+ }
+}