Commit e713e902 authored by Mark Chao's avatar Mark Chao

Reload ApplicationSetting column information before use

It seemed `check_namespace_plan?` column is not detected in migration.
This happens when all migrations are run from scratch.
One possible cause is that `ApplicationSetting` is used prior
to 20170512173638, thus the column in memory does not contain
`check_namespace_plan?`.

This has been the behavior for Rails
https://github.com/rails/rails/issues/6939
parent 7713cb08
......@@ -35,6 +35,8 @@ class ConsumeRemainingMigrateApproverToApprovalRulesInBatchJobs < ActiveRecord::
disable_ddl_transaction!
def up
ApplicationSetting.reset_column_information
Gitlab::BackgroundMigration.steal('MigrateApproverToApprovalRulesInBatch', retry_dead_jobs: true)
process_unmigrated
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment