25 lines
559 B
JavaScript
25 lines
559 B
JavaScript
exports.up = async function(knex) {
|
|
// we want to be able to assign unidentified actors
|
|
await knex.raw(`
|
|
ALTER TABLE releases_actors
|
|
ALTER COLUMN actor_id DROP NOT NULL
|
|
`);
|
|
|
|
await knex.schema.alterTable('releases_actors', (table) => {
|
|
table.increments('id');
|
|
table.string('gender');
|
|
});
|
|
};
|
|
|
|
exports.down = async function(knex) {
|
|
await knex.raw(`
|
|
ALTER TABLE releases_actors
|
|
ALTER COLUMN actor_id SET NOT NULL
|
|
`);
|
|
|
|
await knex.schema.alterTable('releases_actors', (table) => {
|
|
table.dropColumn('id');
|
|
table.dropColumn('gender');
|
|
});
|
|
};
|