-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1190 from Amsterdam/bugfix/update-default-pks-db-…
…for-azure Executed query for default id
- Loading branch information
Showing
5 changed files
with
114 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
app/apps/cases/migrations/0024_alter_default_column_ids_azure.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.2.13 on 2024-02-08 13:36 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("cases", "0023_add_multiple_tags"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunSQL( | ||
sql=""" | ||
DO $$ | ||
BEGIN | ||
-- cases_casetheme | ||
IF NOT EXISTS (SELECT FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind = 'S' AND c.relname = 'cases_casetheme_id_seq' AND n.nspname = 'public') THEN | ||
CREATE SEQUENCE public.cases_casetheme_id_seq INCREMENT BY 1 START WITH 1 MINVALUE 1 NO MAXVALUE CACHE 1; | ||
END IF; | ||
END | ||
$$; | ||
ALTER TABLE cases_casetheme ALTER COLUMN id SET DEFAULT nextval('public.cases_casetheme_id_seq'::regclass); | ||
""" | ||
) | ||
] |
27 changes: 27 additions & 0 deletions
27
app/apps/events/migrations/0002_alter_default_column_ids_azure.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.2.13 on 2024-02-08 15:19 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("events", "0001_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunSQL( | ||
sql=""" | ||
DO $$ | ||
BEGIN | ||
-- events_caseevent | ||
IF NOT EXISTS (SELECT FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind = 'S' AND c.relname = 'events_caseevent_id_seq' AND n.nspname = 'public') THEN | ||
CREATE SEQUENCE public.events_caseevent_id_seq INCREMENT BY 1 START WITH 1 MINVALUE 1 NO MAXVALUE CACHE 1; | ||
END IF; | ||
END | ||
$$; | ||
ALTER TABLE events_caseevent ALTER COLUMN id SET DEFAULT nextval('public.events_caseevent_id_seq'::regclass); | ||
""" | ||
) | ||
] |
27 changes: 27 additions & 0 deletions
27
app/apps/schedules/migrations/0005_alter_default_column_ids_azure.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.2.13 on 2024-02-08 15:19 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("schedules", "0004_schedule_housing_corporation_combiteam"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunSQL( | ||
sql=""" | ||
DO $$ | ||
BEGIN | ||
-- schedules_action | ||
IF NOT EXISTS (SELECT FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind = 'S' AND c.relname = 'schedules_action_id_seq' AND n.nspname = 'public') THEN | ||
CREATE SEQUENCE public.schedules_action_id_seq INCREMENT BY 1 START WITH 1 MINVALUE 1 NO MAXVALUE CACHE 1; | ||
END IF; | ||
END | ||
$$; | ||
ALTER TABLE schedules_action ALTER COLUMN id SET DEFAULT nextval('public.schedules_action_id_seq'::regclass); | ||
""" | ||
) | ||
] |
32 changes: 32 additions & 0 deletions
32
app/apps/workflow/migrations/0009_alter_default_column_ids_azure.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Generated by Django 3.2.13 on 2024-02-08 15:19 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("workflow", "0008_workflowoption_enabled_on_case_closed"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunSQL( | ||
sql=""" | ||
DO $$ | ||
BEGIN | ||
-- workflow_caseusertask | ||
IF NOT EXISTS (SELECT FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind = 'S' AND c.relname = 'workflow_caseusertask_id_seq' AND n.nspname = 'public') THEN | ||
CREATE SEQUENCE public.workflow_caseusertask_id_seq INCREMENT BY 1 START WITH 1 MINVALUE 1 NO MAXVALUE CACHE 1; | ||
END IF; | ||
-- workflow_caseworkflow | ||
IF NOT EXISTS (SELECT FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind = 'S' AND c.relname = 'workflow_caseworkflow_id_seq' AND n.nspname = 'public') THEN | ||
CREATE SEQUENCE public.workflow_caseworkflow_id_seq INCREMENT BY 1 START WITH 1 MINVALUE 1 NO MAXVALUE CACHE 1; | ||
END IF; | ||
END | ||
$$; | ||
ALTER TABLE workflow_caseusertask ALTER COLUMN id SET DEFAULT nextval('public.workflow_caseusertask_id_seq'::regclass); | ||
ALTER TABLE workflow_caseworkflow ALTER COLUMN id SET DEFAULT nextval('public.workflow_caseworkflow_id_seq'::regclass); | ||
""" | ||
) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters