From 0d48aa7114bcd4aaef99244bfedd190292f7b420 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sat, 21 Nov 2026 03:07:19 +0100 Subject: [PATCH] Added variant relation type. --- migrations/20261114120000_scenes_relations.js | 6 ++++++ 1 file changed, 6 insertions(+) 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) => {