A framework for organising things
One master SQL script.
Each logical database component in separate scripts.
Master script only executes component scripts.
Everything is logged to file for analysis.
It is all controlled by a shell script.