Trigger is dropped along with the table.

This commit is contained in:
Guo Xiang Tan 2018-03-08 15:28:00 +08:00
parent 3ef5661608
commit 152f64a18b
1 changed files with 0 additions and 1 deletions

View File

@ -49,7 +49,6 @@ class TableMigrationHelper
ActiveRecord::Base.exec_sql("DROP TABLE IF EXISTS #{old_name}")
ActiveRecord::Base.exec_sql <<~SQL
DROP TRIGGER IF EXISTS #{readonly_trigger_name(old_name)} ON #{old_name};
DROP FUNCTION IF EXISTS #{readonly_function_name(old_name)} CASCADE;
SQL
end