e59d26fadd
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XNQ8ghPfzAfsyVYd6HgFb6
5 lines
338 B
SQL
5 lines
338 B
SQL
-- Alternativen/Regenerierung: mehrere Ergebnisse zum selben Ursprung gruppieren.
|
|
-- variant_of zeigt auf das „Wurzel"-Item (die erste Fassung); Alternativen teilen es.
|
|
ALTER TABLE items ADD COLUMN IF NOT EXISTS variant_of uuid REFERENCES items(id) ON DELETE SET NULL;
|
|
CREATE INDEX IF NOT EXISTS items_variant_idx ON items(variant_of);
|