forked from DebaucheryLibrarian/traxxx
Added tag groups. Added MOFOS scraped. Improved entry ID handling.
This commit is contained in:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user