feat(api): conditional capture - db schema
This commit is contained in:
parent
932bfac62f
commit
c1181287f5
1 changed files with 10 additions and 1 deletions
|
|
@ -30,7 +30,16 @@ SET has_ut_test= TRUE
|
|||
WHERE session_id IN (SELECT session_id FROM public.ut_tests_signals);
|
||||
|
||||
ALTER TABLE IF EXISTS public.projects
|
||||
ADD COLUMN IF NOT EXISTS conditions jsonb DEFAULT NULL;
|
||||
ADD COLUMN IF NOT EXISTS conditional_capture boolean DEFAULT FALSE;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public.projects_conditions
|
||||
(
|
||||
condition_id integer GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
|
||||
project_id integer NOT NULL REFERENCES public.projects (project_id) ON DELETE CASCADE,
|
||||
name varchar(255) NOT NULL,
|
||||
capture_rate integer NOT NULL CHECK (capture_rate >= 0 AND capture_rate <= 100),
|
||||
filters jsonb NOT NULL DEFAULT '[]'::jsonb
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue