Skip to content

Commit

Permalink
Set null columns to the default value prior to setting not null
Browse files Browse the repository at this point in the history
  • Loading branch information
Mythicaeda committed Sep 28, 2023
1 parent 42536fa commit 358ad5a
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
alter table scheduling_goal
alter column description set default '',
alter column description set default '';
update scheduling_goal
set description = default
where description is null;
alter table scheduling_goal
alter column description set not null;

alter table scheduling_condition
alter column description set default '',
alter column description set default '';
update scheduling_condition
set description = default
where description is null;
alter table scheduling_condition
alter column description set not null;

call migrations.mark_migration_applied('7');

0 comments on commit 358ad5a

Please sign in to comment.