mirror of
https://github.com/discourse/discourse.git
synced 2025-03-23 19:15:43 +08:00
FIX: Use CASCADE
when dropping function.
This commit is contained in:
parent
54ad436258
commit
df9d662dab
@ -32,7 +32,7 @@ class ColumnDropper
|
|||||||
columns.each do |column|
|
columns.each do |column|
|
||||||
ActiveRecord::Base.exec_sql <<~SQL
|
ActiveRecord::Base.exec_sql <<~SQL
|
||||||
DROP TRIGGER IF EXISTS #{readonly_trigger_name(table, column)} ON #{table};
|
DROP TRIGGER IF EXISTS #{readonly_trigger_name(table, column)} ON #{table};
|
||||||
DROP FUNCTION IF EXISTS #{readonly_function_name(table, column)};
|
DROP FUNCTION IF EXISTS #{readonly_function_name(table, column)} CASCADE;
|
||||||
SQL
|
SQL
|
||||||
|
|
||||||
# safe cause it is protected on method entry, can not be passed in params
|
# safe cause it is protected on method entry, can not be passed in params
|
||||||
|
Loading…
x
Reference in New Issue
Block a user