|
|
|
|
|
by orf
68 days ago
|
|
> that already has data in production exactly: already has data. It’s not the statement that’s unsafe, it’s the size of the table. That’s what all pattern matching migration checkers get wrong. You might be releasing a new feature gradually and you realised your schema is slightly wrong and want to alter a column type. You’ve got some tiny volume of data in one production cluster. Is it safe? A pseudo rule determining the safety for any arbitrary migration that causes a rewrite could be: smt.is_rewrite and tbl.size < 10MB
Yes: on your tiny new tableNo: on your 10TB orders table To accurately model migration safety you don’t really care about the statement: you care about the effects (locks, rewrites, additions, etc). That’s what is safe or unsafe. |
|