News for hackers. Stuff that matters.
Re:Move Fast and Migrate Things: How We Automated Migrations... by aidos on Wednesday February 06, 2019 @06:11PM (#19101130)
I guess the issue with some of that stuff is that the solution is to do it in stages. Eg, adding a non-nullable column is made safe by doing part of the work and then updating rows in batches. Alembic runs all migrations in a transaction, so there’s not much point batching. It really needs to be handled outside alembic to make sense in the model. I guess that’s all a moot point now in Postgres 11 anyway.
Re:Move Fast and Migrate Things: How We Automated Migrations... by pdimitar on Wednesday February 06, 2019 @09:55PM (#19102583)
What do you mean by your last sentence? How does PG 11 help?
Re:Move Fast and Migrate Things: How We Automated Migrations... by koolba on Wednesday February 06, 2019 @11:00PM (#19102891)
Postgres v11 adds default values for NOT NULL columns without a full table rewrite.