diff --git a/migrations/20261114120000_scenes_relations.js b/migrations/20261114120000_scenes_relations.js index 024cb7b4..0c85b47c 100644 --- a/migrations/20261114120000_scenes_relations.js +++ b/migrations/20261114120000_scenes_relations.js @@ -2,12 +2,18 @@ exports.up = async function(knex) { await knex.schema.createTable('relations_types', (table) => { table.text('type') .primary(); + + // symmetric relations have no direction, e.g. wet and dry variants of each other, stored with the lowest scene ID as the source + table.boolean('symmetric') + .notNullable() + .defaultTo(false); }); await knex('relations_types').insert([ { type: 'rerelease' }, { type: 'remaster' }, { type: 'compilation' }, + { type: 'variant', symmetric: true }, ]); await knex.schema.createTable('scenes_relations', (table) => {