4 ms·
I'm getting sucked into an argument I don't really care about because I actually like South and use it in production for some things. But I mean idempotent SQL
by mattdeboard 14y ago
I'm getting sucked into an argument I don't really care about because I actually like South and use it in production for some things.
But I mean idempotent SQL takes care of the vast majority of all this stuff you mentioned. Write your SQL properly and it doesn't matter whether or not it's been applied before.
- mh- 14y agoI don't know about postgres offhand, but there aren't idempotent solutions to some DDL operations in mysql. (alter table add column, off the top of my head)
- mattdeboard 14y agoYeah in Postgres you can check for the existence of a column in a table. If it exists/doesn't exist you can drop/add the column. Obviously "ALTER TABLE x ADD COLUMN y" isn't idempotent, but the whole SQL statement around it can be idempotent.