Share report template functionality
This commit is contained in:
parent
e6ad0e239e
commit
4822a50d0b
35 changed files with 614 additions and 128 deletions
|
@ -5,14 +5,6 @@ exports.up = function(knex, Promise) {
|
|||
table.increments('id').primary();
|
||||
table.integer('entity').unsigned().notNullable().references('lists.id').onDelete('CASCADE');
|
||||
table.integer('user').unsigned().notNullable().references('users.id').onDelete('CASCADE');
|
||||
table.integer('role', 64).notNullable();
|
||||
table.unique(['entity', 'user']);
|
||||
})
|
||||
|
||||
.createTable('shares_namespace', table => {
|
||||
table.increments('id').primary();
|
||||
table.integer('entity').unsigned().notNullable().references('namespaces.id').onDelete('CASCADE');
|
||||
table.integer('user').unsigned().notNullable().references('users.id').onDelete('CASCADE');
|
||||
table.string('role', 64).notNullable();
|
||||
table.unique(['entity', 'user']);
|
||||
})
|
||||
|
@ -25,6 +17,30 @@ exports.up = function(knex, Promise) {
|
|||
table.unique(['entity', 'user', 'operation']);
|
||||
})
|
||||
|
||||
.createTable('shares_report_template', table => {
|
||||
table.increments('id').primary();
|
||||
table.integer('entity').unsigned().notNullable().references('report_templates.id').onDelete('CASCADE');
|
||||
table.integer('user').unsigned().notNullable().references('users.id').onDelete('CASCADE');
|
||||
table.string('role', 64).notNullable();
|
||||
table.unique(['entity', 'user']);
|
||||
})
|
||||
|
||||
.createTable('permissions_report_template', table => {
|
||||
table.increments('id').primary();
|
||||
table.integer('entity').unsigned().notNullable().references('report_templates.id').onDelete('CASCADE');
|
||||
table.integer('user').unsigned().notNullable().references('users.id').onDelete('CASCADE');
|
||||
table.string('operation', 64).notNullable();
|
||||
table.unique(['entity', 'user', 'operation']);
|
||||
})
|
||||
|
||||
.createTable('shares_namespace', table => {
|
||||
table.increments('id').primary();
|
||||
table.integer('entity').unsigned().notNullable().references('namespaces.id').onDelete('CASCADE');
|
||||
table.integer('user').unsigned().notNullable().references('users.id').onDelete('CASCADE');
|
||||
table.string('role', 64).notNullable();
|
||||
table.unique(['entity', 'user']);
|
||||
})
|
||||
|
||||
.createTable('permissions_namespace', table => {
|
||||
table.increments('id').primary();
|
||||
table.integer('entity').unsigned().notNullable().references('namespaces.id').onDelete('CASCADE');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue