Files
label_editor/server/migrations/20260131020351_add_label.sql
T

18 lines
414 B
SQL

-- Add migration script here
-- Create Label
CREATE TABLE label
(
id bigint NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 ),
name text NOT NULL
);
-- Alter variant table
ALTER TABLE public.variant
ADD label_id bigint,
ADD variant_description text,
ADD CONSTRAINT variant_label_id_fkey
foreign key (label_id)
references unit(id)
ON DELETE NO ACTION;