diff --git a/migrations/000.010.sql b/migrations/000.010.sql new file mode 100644 index 0000000..fa62dd3 --- /dev/null +++ b/migrations/000.010.sql @@ -0,0 +1,7 @@ +-- P5-717: Removing markers positions from database +ALTER TABLE inquiry_markers DROP COLUMN IF EXISTS x1; +ALTER TABLE inquiry_markers DROP COLUMN IF EXISTS y1; +ALTER TABLE inquiry_markers DROP COLUMN IF EXISTS x2; +ALTER TABLE inquiry_markers DROP COLUMN IF EXISTS y2; +ALTER TABLE inquiry_markers DROP COLUMN IF EXISTS x3; +ALTER TABLE inquiry_markers DROP COLUMN IF EXISTS y3; \ No newline at end of file diff --git a/migrations/000.011.sql b/migrations/000.011.sql new file mode 100644 index 0000000..645c570 --- /dev/null +++ b/migrations/000.011.sql @@ -0,0 +1,10 @@ +-- General change: Adding a PK to inquiry_markers table +DO $$ + BEGIN + BEGIN + ALTER TABLE inquiry_markers ADD PRIMARY KEY (id); + EXCEPTION + WHEN invalid_table_definition THEN RAISE NOTICE 'primary key for id already exists in inquiry_markers.'; + END; + END; + $$ \ No newline at end of file