From 54ad436258af8cafd28f668ded31f304fe84df7c Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 30 Aug 2017 15:38:09 +0800 Subject: [PATCH] Revert "FIX: Drop function first before removing trigger." This reverts commit d229969afa5df1716a918b5473332b337cae19ef. --- lib/column_dropper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/column_dropper.rb b/lib/column_dropper.rb index d8ae4f1bf74..ff001ca46da 100644 --- a/lib/column_dropper.rb +++ b/lib/column_dropper.rb @@ -31,8 +31,8 @@ class ColumnDropper columns.each do |column| ActiveRecord::Base.exec_sql <<~SQL - DROP FUNCTION IF EXISTS #{readonly_function_name(table, column)}; DROP TRIGGER IF EXISTS #{readonly_trigger_name(table, column)} ON #{table}; + DROP FUNCTION IF EXISTS #{readonly_function_name(table, column)}; SQL # safe cause it is protected on method entry, can not be passed in params