Merge branch 'warning-pending-migrations' into 'master'
Raise an error on page load when there are pending migrations in development mode. Fixes #5990 See merge request !2491
This commit is contained in:
commit
2becc6fae9
3 changed files with 5 additions and 3 deletions
|
@ -8,7 +8,7 @@ before_script:
|
|||
- touch log/application.log
|
||||
- touch log/test.log
|
||||
- bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}"
|
||||
- bundle exec rake db:reset db:create RAILS_ENV=test
|
||||
- RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate
|
||||
|
||||
spec:feature:
|
||||
script:
|
||||
|
@ -118,7 +118,7 @@ flay:
|
|||
- mysql
|
||||
|
||||
bundler:audit:
|
||||
script:
|
||||
script:
|
||||
- "bundle exec bundle-audit update"
|
||||
- "bundle exec bundle-audit check"
|
||||
tags:
|
||||
|
|
|
@ -16,6 +16,9 @@ Rails.application.configure do
|
|||
# Print deprecation notices to the Rails logger
|
||||
config.active_support.deprecation = :log
|
||||
|
||||
# Raise an error on page load if there are pending migrations
|
||||
config.active_record.migration_error = :page_load
|
||||
|
||||
# Only use best-standards-support built into browsers
|
||||
config.action_dispatch.best_standards_support = :builtin
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ module Gitlab
|
|||
end
|
||||
|
||||
use_db && ActiveRecord::Base.connection.active? &&
|
||||
!ActiveRecord::Migrator.needs_migration? &&
|
||||
ActiveRecord::Base.connection.table_exists?('application_settings')
|
||||
|
||||
rescue ActiveRecord::NoDatabaseError
|
||||
|
|
Loading…
Reference in a new issue