Fix/custom statement dependencies - #826
Conversation
|
For ordering within statements, I think we could simply use the order that they appear in the resource. For |
|
For the after_statements part, let me see if I can make it deterministic. The migration generator stopped preserving declaration order once one of the As for |
|
@zachdaniel Pushed deleting the custom_statements do
statement :create_function do
after_tables ["audit_entries"]
up "CREATE FUNCTION ..."
down "DROP FUNCTION ..."
end
statement :create_trigger do
up "CREATE TRIGGER ... EXECUTE FUNCTION ..."
down "DROP TRIGGER ..."
end
endCreates this migration order |
|
🚀 Thank you for your contribution! 🚀 |
This adds a custom_statement ordering for same resource custom statements (ie, a function before its trigger), makes
after_tablesmean only the table structure and renamesafter_tablestoafter_resourcesto better reflect that it means after the table and custom statements. Addresses #823Contributor checklist
Leave anything that you believe does not apply unchecked.