I have all my tables, views, triggers in different files (Table1.sql, Table2.sql, View1.sql,…), and I need to combine all my model scripts to create a allinone.sql script (e.g. to a deliverable for deploy). Right now I can combine all using “type” command like this:
type *.sql > allinone.sql (or cat in bash)
But, as I have referential integrity, I need to stablish the order to merge the files. (otherwise the allinone.sql script will fail by referential integrity)
Do you know any software or method to do that?
disable fkey check before running your script
at the end, type
to enable your fkey check