Reorder "DROP TABLE / DROP VIEW" so that one wouldn't depend on other; temporarily "DROP VIEW controversies_with_dates" and then recreate it afterwards because otherwise PostgreSQL complains that it can't execute "ALTER TABLE controversies"