refactor(DB): refactored DB init script (#1873)
This commit is contained in:
parent
45b58eeb4f
commit
dc0331aac2
2 changed files with 1 additions and 17 deletions
|
|
@ -1157,11 +1157,7 @@ CREATE TABLE events.tags
|
|||
CREATE INDEX tags_session_id_idx ON events.tags (session_id);
|
||||
CREATE INDEX tags_timestamp_idx ON events.tags (timestamp);
|
||||
|
||||
IF NOT EXISTS(SELECT *
|
||||
FROM pg_type typ
|
||||
WHERE typ.typname = 'ui_tests_status') THEN
|
||||
CREATE TYPE ui_tests_status AS ENUM ('preview', 'in-progress', 'paused', 'closed');
|
||||
END IF;
|
||||
|
||||
CREATE TABLE public.ut_tests
|
||||
(
|
||||
|
|
@ -1192,11 +1188,7 @@ CREATE TABLE public.ut_tests_tasks
|
|||
allow_typing BOOLEAN DEFAULT FALSE
|
||||
);
|
||||
|
||||
IF NOT EXISTS(SELECT *
|
||||
FROM pg_type typ
|
||||
WHERE typ.typname = 'ut_signal_status') THEN
|
||||
CREATE TYPE ut_signal_status AS ENUM ('begin', 'done', 'skipped');
|
||||
END IF;
|
||||
|
||||
CREATE TABLE public.ut_tests_signals
|
||||
(
|
||||
|
|
@ -1297,7 +1289,7 @@ CREATE TABLE public.assist_events_aggregates_logs
|
|||
time BIGINT not null
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public.projects_conditions
|
||||
CREATE TABLE 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,
|
||||
|
|
|
|||
|
|
@ -1118,11 +1118,7 @@ CREATE TABLE events.tags
|
|||
CREATE INDEX tags_session_id_idx ON events.tags (session_id);
|
||||
CREATE INDEX tags_timestamp_idx ON events.tags (timestamp);
|
||||
|
||||
IF NOT EXISTS(SELECT *
|
||||
FROM pg_type typ
|
||||
WHERE typ.typname = 'ui_tests_status') THEN
|
||||
CREATE TYPE ui_tests_status AS ENUM ('preview', 'in-progress', 'paused', 'closed');
|
||||
END IF;
|
||||
|
||||
CREATE TABLE public.ut_tests
|
||||
(
|
||||
|
|
@ -1153,11 +1149,7 @@ CREATE TABLE public.ut_tests_tasks
|
|||
allow_typing BOOLEAN DEFAULT FALSE
|
||||
);
|
||||
|
||||
IF NOT EXISTS(SELECT *
|
||||
FROM pg_type typ
|
||||
WHERE typ.typname = 'ut_signal_status') THEN
|
||||
CREATE TYPE ut_signal_status AS ENUM ('begin', 'done', 'skipped');
|
||||
END IF;
|
||||
|
||||
CREATE TABLE public.ut_tests_signals
|
||||
(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue