4 ms·
> Fear column addition no more This section was really surprising to read! I use the strong_migrations [1] gem to catch "NOT NULL column with a default value",
by nathan_f77 8y ago
> Fear column addition no more
This section was really surprising to read! I use the strong_migrations [1] gem to catch "NOT NULL column with a default value", because it's such a common mistake.
I guess I had assumed that this was just something we had to accept, based on decades of architecture decisions, and the way that Postgres was written. It never occurred to me that it was actually possible to change the default behavior of Postgres and fix the underlying issue.
[1] https://github.com/ankane/strong_migrations#adding-a-column-with-a-default-value https://github.com/ankane/strong_migrations#adding-a-column-...
- booleanbetrayal 8y agoThis feature has me way more excited than I probably should be. Been splitting up relatively simple schema migrations into multiple steps for years now, and definitely welcoming this change.
- mb4nck 8y agoNotably, that feature got written by somebody from Salesforce (I assume on their work time, but not sure), and finished up by a Postgres major contributor. It might be the first major contribution from Salesforce outside of all the stuff Tom Lane did when he was working there.
- petergeoghegan 8y agoNot so. I worked on UPSERT for several years as a Salesforce employee, as well as quite a number of other things. I worked for Heroku, a Salesforce business unit, from 2013-2017.