diff --git a/src/backend/migrations/004-update-default-values.sql b/src/backend/migrations/004-update-default-values.sql index ac3d9fc146..a21055139a 100644 --- a/src/backend/migrations/004-update-default-values.sql +++ b/src/backend/migrations/004-update-default-values.sql @@ -4,18 +4,10 @@ -- Start a transaction BEGIN; --- Update mapping_issue_categories table -ALTER TABLE public.mapping_issue_categories -ALTER COLUMN archived SET DEFAULT false; - -- Update mbtiles_path table ALTER TABLE public.mbtiles_path ALTER COLUMN created_at SET DEFAULT now(); --- Update project_chat table -ALTER TABLE public.project_chat -ALTER COLUMN time_stamp SET DEFAULT now(); - -- Update projects table ALTER TABLE public.projects ALTER COLUMN created SET DEFAULT now(), @@ -23,28 +15,16 @@ ALTER COLUMN last_updated SET DEFAULT now(), ALTER COLUMN status SET DEFAULT 'DRAFT', ALTER COLUMN mapper_level SET DEFAULT 'INTERMEDIATE', ALTER COLUMN priority SET DEFAULT 'MEDIUM', -ALTER COLUMN featured SET DEFAULT false, -ALTER COLUMN mapping_permission SET DEFAULT 'ANY', -ALTER COLUMN validation_permission SET DEFAULT 'LEVEL'; +ALTER COLUMN featured SET DEFAULT false; -- Update task_history table ALTER TABLE public.task_history ALTER COLUMN action_date SET DEFAULT now(); --- Update task_invalidation_history table -ALTER TABLE public.task_invalidation_history -ALTER COLUMN is_closed SET DEFAULT false, -ALTER COLUMN updated_date SET DEFAULT now(); - -- Update tasks table ALTER TABLE public.tasks ALTER COLUMN task_status SET DEFAULT 'READY'; --- Update teams table -ALTER TABLE public.teams -ALTER COLUMN invite_only SET DEFAULT false, -ALTER COLUMN visibility SET DEFAULT 'PUBLIC'; - -- Update user_roles table ALTER TABLE public.user_roles ALTER COLUMN role SET DEFAULT 'MAPPER'; diff --git a/src/backend/migrations/revert/004-update-default-values.sql b/src/backend/migrations/revert/004-update-default-values.sql index 75a0b25beb..cf614d1b6d 100644 --- a/src/backend/migrations/revert/004-update-default-values.sql +++ b/src/backend/migrations/revert/004-update-default-values.sql @@ -4,18 +4,10 @@ -- Start a transaction BEGIN; --- Revert changes in mapping_issue_categories table -ALTER TABLE public.mapping_issue_categories -ALTER COLUMN archived DROP DEFAULT; - -- Revert changes in mbtiles_path table ALTER TABLE public.mbtiles_path ALTER COLUMN created_at DROP DEFAULT; --- Revert changes in project_chat table -ALTER TABLE public.project_chat -ALTER COLUMN time_stamp DROP DEFAULT; - -- Revert changes in projects table ALTER TABLE public.projects ALTER COLUMN created DROP DEFAULT, @@ -23,28 +15,16 @@ ALTER COLUMN last_updated DROP DEFAULT, ALTER COLUMN status DROP DEFAULT, ALTER COLUMN mapper_level DROP DEFAULT, ALTER COLUMN priority DROP DEFAULT, -ALTER COLUMN featured DROP DEFAULT, -ALTER COLUMN mapping_permission DROP DEFAULT, -ALTER COLUMN validation_permission DROP DEFAULT; +ALTER COLUMN featured DROP DEFAULT; -- Revert changes in task_history table ALTER TABLE public.task_history ALTER COLUMN action_date DROP DEFAULT; --- Revert changes in task_invalidation_history table -ALTER TABLE public.task_invalidation_history -ALTER COLUMN is_closed DROP DEFAULT, -ALTER COLUMN updated_date DROP DEFAULT; - -- Revert changes in task_invalidation_history_id_seq table ALTER TABLE public.task_invalidation_history_id_seq ALTER COLUMN task_status DROP DEFAULT; --- Revert changes in teams table -ALTER TABLE public.teams -ALTER COLUMN invite_only DROP DEFAULT, -ALTER COLUMN visibility DROP DEFAULT; - -- Revert changes in user_roles table ALTER TABLE public.user_roles ALTER COLUMN role DROP DEFAULT;