we have a legacy tool that helps us generate a list of "ml_add_table_script" executions, but whenever having changes I get a new list of "ml_add_table_script" executions... and the "script_version" table gets a bit hard to oversee.
It looks like this procedure mostly just fills the tables "ml_script_version", "ml_script", "ml_table_script" ...
I would like to perform a litle clean up.
Would it be okay If i just write my own script to remove contenst from "ml_table_script", "ml_script" and "ml_script_version" .... Or would I still be missing something ? (or maybe there is a better way?)
asked 15 Sep '14, 05:29
AFAIK the official way to delete unnecessary scripts is to add them with NULL as script contents, such as
Immediately accessing the ML system tables may work, too, but it may also bear the risk of having missed something, as you suspect...
If you need to delete more than a few scripts, it certainly is possible to generate the according ml_add_...script statements automatically, e.g. with a cursor loop over the according script entries and then calling the ml system procedure with the appropriate parameters. In case you are using SQL Anywhere as consolidated database, the FOR statement would be handy IMHO to do so.