Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Combine two migrations into one.
Browse files Browse the repository at this point in the history
  • Loading branch information
horenso committed Apr 16, 2024
1 parent 777afc9 commit 835c23e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ DROP TYPE drawing_shape_type_old;

ALTER TABLE drawings
ADD COLUMN color varchar,
ADD COLUMN fill_pattern varchar,
ADD COLUMN fill_enabled boolean,
ADD COLUMN stroke_width real;

UPDATE drawings
SET
color = '',
fill_pattern = false,
fill_enabled = false,
stroke_width = 1.0;


ALTER TABLE drawings ALTER COLUMN color SET NOT NULL;
ALTER TABLE drawings ALTER COLUMN fill_pattern SET NOT NULL;
ALTER TABLE drawings ALTER COLUMN fill_enabled SET NOT NULL;
ALTER TABLE drawings ALTER COLUMN stroke_width SET NOT NULL;
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ ALTER TYPE drawing_shape_type ADD VALUE 'image';

ALTER TABLE drawings
DROP COLUMN color,
DROP COLUMN fill_pattern,
DROP COLUMN fill_enabled,
DROP COLUMN stroke_width;

0 comments on commit 835c23e

Please sign in to comment.