Refactored In The Crack. Added chapter videos (unused) and dates. Added stylized entity name field.

This commit is contained in:
DebaucheryLibrarian
2026-02-07 05:53:16 +01:00
parent 33179c0829
commit 9a8527a780
6 changed files with 249 additions and 211 deletions

View File

@@ -0,0 +1,50 @@
exports.up = async function(knex) {
await knex.schema.alterTable('chapters', (table) => {
table.datetime('date');
});
await knex.schema.createTable('chapters_trailers', (table) => {
table.integer('chapter_id')
.notNullable()
.references('id')
.inTable('chapters')
.onDelete('cascade');
table.text('media_id')
.notNullable()
.references('id')
.inTable('media')
.onDelete('cascade');
});
await knex.schema.createTable('chapters_teasers', (table) => {
table.integer('chapter_id')
.notNullable()
.references('id')
.inTable('chapters')
.onDelete('cascade');
table.text('media_id')
.notNullable()
.references('id')
.inTable('media')
.onDelete('cascade');
});
await knex.schema.alterTable('entities', (table) => {
table.string('name_stylized');
});
};
exports.down = async function(knex) {
await knex.schema.alterTable('chapters', (table) => {
table.dropColumn('date');
});
await knex.schema.alterTable('entities', (table) => {
table.dropColumn('name_stylized');
});
await knex.schema.dropTable('chapters_trailers');
await knex.schema.dropTable('chapters_teasers');
};