Skip to content
Snippets Groups Projects
Commit 2becc6fa authored by Robert Speicher's avatar Robert Speicher
Browse files

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
parents 0782ca77 96440042
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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:
Loading
Loading
@@ -118,7 +118,7 @@ flay:
- mysql
 
bundler:audit:
script:
script:
- "bundle exec bundle-audit update"
- "bundle exec bundle-audit check"
tags:
Loading
Loading
Loading
Loading
@@ -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
 
Loading
Loading
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment