Skip to content

Commit

Permalink
build: add IF EXISTS to DROP COLUMN in migration
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Jul 4, 2024
1 parent 1765ab9 commit 5f13494
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/backend/migrations/005-drop-unnecessary-tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DROP TABLE IF EXISTS public.task_invalidation_history;
DROP SEQUENCE IF EXISTS public.task_invalidation_history_id_seq;

ALTER TABLE public.projects
DROP COLUMN license_id;
DROP COLUMN IF EXISTS license_id;

DROP TABLE IF EXISTS public.user_licenses;
DROP TABLE IF EXISTS public.licenses;
Expand All @@ -40,8 +40,8 @@ DROP TABLE IF EXISTS public.teams;
DROP SEQUENCE IF EXISTS public.teams_id_seq;

ALTER TABLE public.projects
DROP COLUMN mapping_permission,
DROP COLUMN validation_permission;
DROP COLUMN IF EXISTS mapping_permission,
DROP COLUMN IF EXISTS validation_permission;
DROP TYPE IF EXISTS public.validationpermission;
DROP TYPE IF EXISTS public.mappingpermission;
DROP TYPE IF EXISTS public.teamvisibility;
Expand Down

0 comments on commit 5f13494

Please sign in to comment.