Added tag groups. Added MOFOS scraped. Improved entry ID handling.

This commit is contained in:
2019-04-07 02:15:57 +02:00
parent 6fea65a411
commit 885a815022
7 changed files with 408 additions and 19 deletions

View File

@@ -19,10 +19,20 @@ exports.up = knex => Promise.resolve()
.references('id')
.inTable('directors');
}))
.then(() => knex.schema.createTable('tags_groups', (table) => {
table.string('group', 20)
.primary();
table.string('name', 20);
}))
.then(() => knex.schema.createTable('tags', (table) => {
table.string('tag', 20)
.primary();
table.string('group_id', 20)
.references('group')
.inTable('tags_groups');
table.string('alias_for', 20)
.references('tag')
.inTable('tags');
@@ -121,4 +131,5 @@ exports.down = knex => Promise.resolve()
.then(() => knex.schema.dropTable('networks'))
.then(() => knex.schema.dropTable('actors'))
.then(() => knex.schema.dropTable('directors'))
.then(() => knex.schema.dropTable('tags_groups'))
.then(() => knex.schema.dropTable('tags'));