From 8a362a1c3cd7395279efb6d3b1ceaa2d238470ef Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Tue, 25 Jul 2017 15:36:30 +0900 Subject: [PATCH] Reset ActiveRecord cache after dropping columns. --- lib/column_dropper.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/column_dropper.rb b/lib/column_dropper.rb index 2cfc81c3175..7c77a25331c 100644 --- a/lib/column_dropper.rb +++ b/lib/column_dropper.rb @@ -38,6 +38,8 @@ class ColumnDropper DROP TRIGGER IF EXISTS #{readonly_trigger_name(table, column)} ON #{table}; SQL end + + Discourse.reset_active_record_cache end end