braintree / pg_ha_migrations

Enforces DDL/migration safety in Ruby on Rails project with an emphasis on explicitly choosing trade-offs and avoiding unnecessary magic.
MIT License
220 stars 23 forks source link

Raise error when adding column and default in two steps #67

Closed jcoleman closed 2 years ago

jcoleman commented 3 years ago

As of Postgres 11+ we prefer to add a column with a default (assuming the value is constant) in a single step rather than, in the same migration, adding the column and separately setting the default.

Fixes #64.