4 ms·
You don't need a tool for this. If you store base data in one schema, and functions/views in another, you can update this second schema willy nilly without worr
by slagfart 10y ago
You don't need a tool for this. If you store base data in one schema, and functions/views in another, you can update this second schema willy nilly without worrying about damaging your data.
Just start the second file with DROP SCHEMA IF EXISTS schemaname CASCADE; CREATE SCHEMA schemaname;. Then, make sure any functions/views/permissions built on top of this schema are also contained within this file.
- inopinatus 10y agoOr you can just pull the SQL for the stored procedure from a table column and execute it dynamically. Now it's an ops problem :-)
- jessaustin 10y agoHaha, usually we hear this from smart guys who have been working for about 8 months...
- angersock 10y agoOh, that's slick. Nice!