TableUtils - dropAndClean(String tableName)

Drops a database table and cleans up references to the table.

Note: Use with extreme caution. Dropping a database table permanently deletes the table and all its data. If the table is extended, use dropTableAndExtensions.
Table 1. Parameters
Name Type Description
tableName String Name of the table to drop
Table 2. Returns
Type Description
void

var tu = new TableUtils();
tu.dropAndClean("table_that_will_be_lost_forever");
Output:
dropping table table_that_will_be_lost_forever
Starting cache flush
Cache flush complete
TABLE DROP: admin dropped table table_that_will_be_lost_forever
*** Script: removing gauges for table_that_will_be_lost_forever
*** Script: removing forms for table_that_will_be_lost_forever
*** Script: removing styles for table_that_will_be_lost_forever
*** Script: removing forms sections for table_that_will_be_lost_forever
*** Script: removing lists for table_that_will_be_lost_forever
*** Script: removing related lists for table_that_will_be_lost_forever
*** Script: removing references to table_that_will_be_lost_forever
*** Script: removing dictionary entries for table_that_will_be_lost_forever
Background message, type:info, message: Table deleted