Skip to content
Snippets Groups Projects

Print a deprecation notice for postgres upgrades if <11

Merged Dustin Collins requested to merge postgres-deprecation-notice into master
1 file
+ 2
6
Compare changes
  • Side-by-side
  • Inline
@@ -69,7+69,7 @@
add_command_under_category 'pg-upgrade', 'database',
'Upgrade the PostgreSQL DB to the latest supported version',
2 do |_cmd_name|
options = GitlabCtl::PgUpgrade.parse_options(ARGV)
@db_service_name = 'postgresql'
@db_worker = GitlabCtl::PgUpgrade.new(
base_path,
@@ -97,7+97,7 @@
@attributes['postgresql']['version'].nil?
end
log "postgresql['version'] is set in /etc/gitlab/gitlab.rb. Not checking for a PostgreSQL upgrade"
if @attributes['postgresql']['version'].major.to_f < '11'.to_f
deprecation_message
end
deprecation_message if @attributes['postgresql']['version'].major.to_f < '11'.to_f
Kernel.exit 0
end
@@ -118,9 +116,7 @@ add_command_under_category 'pg-upgrade', 'database',
Kernel.exit 0
end
unless @db_worker.target_version >= '11'
deprecation_message
end
deprecation_message if @db_worker.target_version < '11'
unless GitlabCtl::Util.progress_message(
'Checking if PostgreSQL bin files are symlinked to the expected location'
Loading