forked from DebaucheryLibrarian/traxxx
22 lines
539 B
JavaScript
22 lines
539 B
JavaScript
|
exports.up = async (knex) => {
|
||
|
await knex.schema.alterTable('tags', (table) => {
|
||
|
table.specificType('implied_tag_ids', 'integer[]');
|
||
|
});
|
||
|
|
||
|
await knex.schema.alterTable('releases_tags', (table) => {
|
||
|
table.enum('source', ['scraper', 'editor', 'implied'])
|
||
|
.notNullable()
|
||
|
.defaultTo('scraper');
|
||
|
});
|
||
|
};
|
||
|
|
||
|
exports.down = async (knex) => {
|
||
|
await knex.schema.alterTable('tags', (table) => {
|
||
|
table.dropColumn('implied_tag_ids');
|
||
|
});
|
||
|
|
||
|
await knex.schema.alterTable('releases_tags', (table) => {
|
||
|
table.dropColumn('source');
|
||
|
});
|
||
|
};
|