forked from DebaucheryLibrarian/traxxx
24 lines
516 B
JavaScript
24 lines
516 B
JavaScript
const config = require('config');
|
|
|
|
exports.up = async (knex) => {
|
|
await knex.schema.createTable('releases_caps', (table) => {
|
|
table.integer('release_id')
|
|
.notNullable()
|
|
.references('id')
|
|
.inTable('releases');
|
|
|
|
table.text('media_id')
|
|
.notNullable()
|
|
.references('id')
|
|
.inTable('media');
|
|
});
|
|
|
|
await knex.raw('GRANT ALL ON releases_caps TO :visitor;', {
|
|
visitor: knex.raw(config.database.query.user),
|
|
});
|
|
};
|
|
|
|
exports.down = async (knex) => {
|
|
await knex.schema.dropTable('releases_caps');
|
|
};
|