-
Hi, these are possibly naïve questions! I'm new to this stuff. Assume I've written a sqitch migration from schema version In this situation, is it generally safe to run the sqitch migration from version On a related note, does sqitch guarantee that a migration from schema version |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In general, yes, I think so. Of course it very much depends on the change. For example, if you add a new column with a default value to a table with, say, a billion rows, depending on your database engine and version, it could require a rewrite of the entire table, which would put a lot of pressure on clients and could greatly increase query latency. A better approach is to use a version of a database that dynamically assigns missing defaults at query time, like Postgres 11, or else don't include a default and dynamically assign it when missing in your But the short answer is: test it and see.
It does not, because most database DDLs are not atomic. For those that are, put a |
Beta Was this translation helpful? Give feedback.
In general, yes, I think so. Of course it very much depends on the change. For example, if you add a new column with a default value to a table with, say, a billion rows, depending on your database engine and version, it could require a rewrite of the entire table, which would put a lot of pressure on clients and could greatly increase query latency. A better approach is to use a version of a database that dynamically assigns missing defaults at query time, like Postgres 11, or else don't include a default and dynamically assign it when missing in your
n…