Storing scene language and production date precision. Refactored Teen Core Club.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.schema.createTable('languages', (table) => {
|
||||
table.string('alpha2')
|
||||
.primary();
|
||||
|
||||
table.text('name');
|
||||
table.text('name_native');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('releases', (table) => {
|
||||
table.enum('production_date_precision', ['year', 'month', 'week', 'day', 'hour', 'minute', 'second'])
|
||||
.defaultTo('day');
|
||||
|
||||
table.string('language_alpha2')
|
||||
.references('alpha2')
|
||||
.inTable('languages');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.alterTable('releases', (table) => {
|
||||
table.dropColumn('production_date_precision');
|
||||
table.dropColumn('language_alpha2');
|
||||
});
|
||||
|
||||
await knex.schema.dropTable('languages');
|
||||
};
|
||||
Reference in New Issue
Block a user