Just want to add Kevin's comment. Destruction of scripts in separate files. Then write a script to put all the files in the execution order.
When dropping a large database with a lot of interdependencies, since one large file will not bring you much benefit, as in most cases the script will not run without errors. In my world, I use a naming convention that helps me quickly see which representations in this case depend on other representations. For example, if I have a view that just dumps the data, I would use something like this v_VIEW_NAME_ORIGINATING-TABLE_Dump, then I would change the suffix to something like _weekly or _weekly_Summary for the views that are output from the main dump table,
I learned my lesson many years ago and have since followed this naming scheme in all of my databases.
source share