smon/sql/00022.sql

5 lines
363 B
MySQL
Raw Normal View History

ALTER TABLE public.problem ALTER COLUMN trigger_id DROP NOT NULL;
ALTER TABLE public.problem ADD COLUMN datapoints JSONB NOT NULL DEFAULT '{}';
ALTER TABLE public.problem DROP CONSTRAINT problem_trigger_fk;
ALTER TABLE public.problem ADD CONSTRAINT problem_trigger_fk FOREIGN KEY (trigger_id) REFERENCES public."trigger"(id) ON DELETE SET NULL ON UPDATE CASCADE;