Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -555,9 +555,7 @@ If you're using Postgres 12+, you can add the NOT NULL to the column after valid
def change do
execute "ALTER TABLE recipes VALIDATE CONSTRAINT favourite_not_null", ""

alter table("recipes") do
modify :favourite, :boolean, null: false
end
execute "ALTER TABLE recipes ALTER COLUMN favourite SET NOT NULL", "ALTER TABLE recipes ALTER COLUMN favourite DROP NOT NULL"

drop constraint("recipes", :favourite_not_null)
end
Expand Down