Added actor date of birth and death precision table.

This commit is contained in:
DebaucheryLibrarian
2026-09-18 23:26:26 +02:00
parent a62cfcac3d
commit b1836b61c8
3 changed files with 64 additions and 1 deletions
@@ -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');
});
};