From 152f64a18baf9b838ebc6342aeee3dd83195c3c8 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 8 Mar 2018 15:28:00 +0800 Subject: [PATCH] Trigger is dropped along with the table. --- lib/table_migration_helper.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/table_migration_helper.rb b/lib/table_migration_helper.rb index 72870ce0d02..477cd7fa0e6 100644 --- a/lib/table_migration_helper.rb +++ b/lib/table_migration_helper.rb @@ -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