Added relation comment migration.

This commit is contained in:
DebaucheryLibrarian
2026-11-21 04:23:25 +01:00
parent db84f1aa53
commit c1b4787366
@@ -0,0 +1,22 @@
exports.up = async function(knex) {
await knex('relations_types').insert({ type: 'reedit' }); // a rerelease that was significantly altered, a remaster implies improvement rather than reimagining
await knex.schema.alterTable('scenes_relations', (table) => {
// clarify how the scene was transformed, so the closest type can be picked instead of needing a type for every variation
table.text('comment');
});
};
exports.down = async function(knex) {
await knex.schema.alterTable('scenes_relations', (table) => {
table.dropColumn('comment');
});
await knex('scenes_relations')
.where('type', 'reedit')
.delete();
await knex('relations_types')
.where('type', 'reedit')
.delete();
};