when adding tables to known_tables, drop an existing ermrest_history trigger
when adding tables to known_tables, drop an existing ermrest_history trigger

This is a safety/consistency heuristic. It protects against DBAs who
rename SQL tables in such a way that ermrest sees them as a newly
arriving table, but they actually have a preexisting trigger which
would try to record tuple changes into a previous history table.

After dropping these triggers, the idempotent trigger creation in
enable_table_history() will correctly wire up the table to its new
history-tracking table. This gives a consistent experience as if one
table died and another was born.

If a DBA really intended to rename and keep a contiguous history, they
should have called _ermrest.rescan_introspect_by_oid(), which would
track the identity of the table, keeping its original known_tables
entry and history tracking table, while updating its table name and/or
schema name.

informatics-isi-edu/ermrest,informatics-isi-edu/ermrest