Added actor date of birth and death precision table.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.schema.alterTable('actors', (table) => {
|
||||
table.string('date_of_birth_precision')
|
||||
.notNullable()
|
||||
.defaultTo('day');
|
||||
|
||||
table.string('date_of_death_precision')
|
||||
.notNullable()
|
||||
.defaultTo('day');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('actors_profiles', (table) => {
|
||||
table.string('date_of_birth_precision')
|
||||
.notNullable()
|
||||
.defaultTo('day');
|
||||
|
||||
table.string('date_of_death_precision')
|
||||
.notNullable()
|
||||
.defaultTo('day');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.alterTable('actors', (table) => {
|
||||
table.dropColumn('date_of_birth_precision');
|
||||
table.dropColumn('date_of_death_precision');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('actors_profiles', (table) => {
|
||||
table.dropColumn('date_of_birth_precision');
|
||||
table.dropColumn('date_of_death_precision');
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user