Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Mountney <david@twkie.net>2019-06-20 09:35:56 +0300
committerDJ Mountney <david@twkie.net>2019-06-25 20:44:40 +0300
commit7a089438fa138934b5dab7bdd575a74a1dfd03c0 (patch)
tree70adb17a83b29ad3901f3a5b86a7ee7f8a37e383 /lib/gitlab/database.rb
parent4d1e2ec45e993c8d9ebf3d379b5d1f20d3684658 (diff)
Check supported version when migrating
Set the mininum supported migration version to be the schema version as of 11.11.0, and errors you if that is not detected during gitlab:db:configure
Diffstat (limited to 'lib/gitlab/database.rb')
-rw-r--r--lib/gitlab/database.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb
index e4d4779ba9a..5e5b79b8e99 100644
--- a/lib/gitlab/database.rb
+++ b/lib/gitlab/database.rb
@@ -11,6 +11,10 @@ module Gitlab
# https://dev.mysql.com/doc/refman/5.7/en/datetime.html
MAX_TIMESTAMP_VALUE = Time.at((1 << 31) - 1).freeze
+ # Minimum schema version from which migrations are be supported
+ # Migrations before this version may have been removed
+ MIN_SCHEMA_VERSION = 20190506135400
+
def self.config
ActiveRecord::Base.configurations[Rails.env]
end