feat(DB): delta lock tables before structural changes
This commit is contained in:
parent
07aeff5ab1
commit
5c07b1037f
2 changed files with 16 additions and 10 deletions
|
|
@ -22,10 +22,18 @@ $$
|
|||
SELECT 'v1.11.0-ee'
|
||||
$$ LANGUAGE sql IMMUTABLE;
|
||||
|
||||
ALTER TYPE issue_type ADD VALUE IF NOT EXISTS 'mouse_thrashing';
|
||||
|
||||
LOCK TABLE ONLY events.inputs IN ACCESS EXCLUSIVE MODE;
|
||||
ALTER TABLE events.inputs
|
||||
ADD COLUMN duration integer NULL,
|
||||
ADD COLUMN hesitation integer NULL;
|
||||
|
||||
LOCK TABLE ONLY events.clicks IN ACCESS EXCLUSIVE MODE;
|
||||
ALTER TABLE events.clicks
|
||||
ADD COLUMN hesitation integer NULL;
|
||||
|
||||
LOCK TABLE ONLY public.projects IN ACCESS EXCLUSIVE MODE;
|
||||
ALTER TABLE public.projects
|
||||
ALTER COLUMN gdpr SET DEFAULT '{
|
||||
"maskEmails": true,
|
||||
|
|
@ -34,9 +42,4 @@ ALTER TABLE public.projects
|
|||
"defaultInputMode": "obscured"
|
||||
}'::jsonb;
|
||||
|
||||
ALTER TYPE issue_type ADD VALUE IF NOT EXISTS 'mouse_thrashing';
|
||||
|
||||
ALTER TABLE events.clicks
|
||||
ADD COLUMN hesitation integer NULL;
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -22,10 +22,18 @@ $$
|
|||
SELECT 'v1.11.0'
|
||||
$$ LANGUAGE sql IMMUTABLE;
|
||||
|
||||
ALTER TYPE issue_type ADD VALUE IF NOT EXISTS 'mouse_thrashing';
|
||||
|
||||
LOCK TABLE ONLY events.inputs IN ACCESS EXCLUSIVE MODE;
|
||||
ALTER TABLE events.inputs
|
||||
ADD COLUMN duration integer NULL,
|
||||
ADD COLUMN hesitation integer NULL;
|
||||
|
||||
LOCK TABLE ONLY events.clicks IN ACCESS EXCLUSIVE MODE;
|
||||
ALTER TABLE events.clicks
|
||||
ADD COLUMN hesitation integer NULL;
|
||||
|
||||
LOCK TABLE ONLY public.projects IN ACCESS EXCLUSIVE MODE;
|
||||
ALTER TABLE public.projects
|
||||
ALTER COLUMN gdpr SET DEFAULT '{
|
||||
"maskEmails": true,
|
||||
|
|
@ -34,9 +42,4 @@ ALTER TABLE public.projects
|
|||
"defaultInputMode": "obscured"
|
||||
}'::jsonb;
|
||||
|
||||
ALTER TYPE issue_type ADD VALUE IF NOT EXISTS 'mouse_thrashing';
|
||||
|
||||
ALTER TABLE events.clicks
|
||||
ADD COLUMN hesitation integer NULL;
|
||||
|
||||
COMMIT;
|
||||
Loading…
Add table
Reference in a new issue