summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDJ Mountney <david@twkie.net>2019-06-20 08:50:46 -0700
committerDJ Mountney <david@twkie.net>2019-06-25 10:44:40 -0700
commite448124fab59ce562fac5db9d9919d24ac95fba7 (patch)
tree8a92cf78d02d0b967668a9730b02d5795bdb2688 /lib
parentf4232d848eebcdc709ccec9c2004753accb3f3b5 (diff)
downloadgitlab-ce-e448124fab59ce562fac5db9d9919d24ac95fba7.tar.gz
Add an flag for skipping the schema version check
If you chose to use the rollback migration feature on your current version for example, you should still have a way to migrate, being that you are still on a supported migration path.
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/migrate/schema_check.rake2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/tasks/migrate/schema_check.rake b/lib/tasks/migrate/schema_check.rake
index e8505e576a4..d78599a3759 100644
--- a/lib/tasks/migrate/schema_check.rake
+++ b/lib/tasks/migrate/schema_check.rake
@@ -1,5 +1,7 @@
desc 'Configures the database by running migrate, or by loading the schema and seeding if needed'
task schema_version_check: :environment do
+ next if ENV['SKIP_SCHEMA_VERSION_CHECK']
+
schema_version = ActiveRecord::Migrator.current_version
# Ensure migrations are being run from a supported schema version