clear schema cache during a key migration

Change-Id: I22341e1e1bd173e75260697ded391f67cf6d5b7c
Reviewed-on: https://gerrit.instructure.com/57387
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2015-06-29 14:12:26 -06:00
parent 23a5d93239
commit b247cd4517
1 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,8 @@ class GrandfatherDefaultAccountInvitationPreviews < ActiveRecord::Migration
tag :predeploy
def self.up
Account.connection.schema_cache.clear!
Account.reset_column_information
return unless Account.default && Shard.current == Account.default.shard
account = Account.default
account.settings[:allow_invitation_previews] = true