mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: Drop function first before removing trigger.
This commit is contained in:
parent
9a861c1b43
commit
d229969afa
1 changed files with 1 additions and 1 deletions
|
@ -31,8 +31,8 @@ class ColumnDropper
|
|||
|
||||
columns.each do |column|
|
||||
ActiveRecord::Base.exec_sql <<~SQL
|
||||
DROP TRIGGER IF EXISTS #{readonly_trigger_name(table, column)} ON #{table};
|
||||
DROP FUNCTION IF EXISTS #{readonly_function_name(table, column)};
|
||||
DROP TRIGGER IF EXISTS #{readonly_trigger_name(table, column)} ON #{table};
|
||||
SQL
|
||||
|
||||
# safe cause it is protected on method entry, can not be passed in params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue