TylerWasniowski / WritersUnblocked

A collaborative story writing platform written in Elixir using the Phoenix framework.
MIT License
2 stars 0 forks source link

Fix Migration "LockedNotNullable" #30

Closed StephenKairos closed 6 years ago

StephenKairos commented 6 years ago

alter table(:stories) do modify :locked, :boolean, default: false, null: false end

This causes an error with: mix ecto.migrate

DEBUG: [info] == Running WritersUnblocked.Repo.Migrations.LockedNotNullable.change/0 forward [info] alter table stories ** (Postgrex.Error) ERROR 23502 (not_null_violation): column "locked" contains null values


Need to find a solution for this.

StephenKairos commented 6 years ago

Internal SQL issue. Did psql commands. Fixed.