Commit 9de9e35a authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch...

Merge branch '324160-geo-zero-downtime-upgrades-step-gitlab-rake-db-migrate-fails-in-13-9-3' into 'master'

Fix zero-downtime upgrade from 13.8.x to 13.9.3

See merge request gitlab-org/gitlab!56352
parents 5d5fed39 f814f271
...@@ -8,6 +8,10 @@ class RenameAssetProxyAllowlistOnApplicationSettings < ActiveRecord::Migration[6 ...@@ -8,6 +8,10 @@ class RenameAssetProxyAllowlistOnApplicationSettings < ActiveRecord::Migration[6
disable_ddl_transaction! disable_ddl_transaction!
def up def up
cleanup_concurrent_column_rename :application_settings,
:asset_proxy_whitelist,
:asset_proxy_allowlist
rename_column_concurrently :application_settings, rename_column_concurrently :application_settings,
:asset_proxy_allowlist, :asset_proxy_allowlist,
:asset_proxy_whitelist :asset_proxy_whitelist
...@@ -17,5 +21,9 @@ class RenameAssetProxyAllowlistOnApplicationSettings < ActiveRecord::Migration[6 ...@@ -17,5 +21,9 @@ class RenameAssetProxyAllowlistOnApplicationSettings < ActiveRecord::Migration[6
undo_rename_column_concurrently :application_settings, undo_rename_column_concurrently :application_settings,
:asset_proxy_allowlist, :asset_proxy_allowlist,
:asset_proxy_whitelist :asset_proxy_whitelist
undo_cleanup_concurrent_column_rename :application_settings,
:asset_proxy_whitelist,
:asset_proxy_allowlist
end end
end end
...@@ -8,14 +8,12 @@ class CleanUpAssetProxyWhitelistRenameOnApplicationSettings < ActiveRecord::Migr ...@@ -8,14 +8,12 @@ class CleanUpAssetProxyWhitelistRenameOnApplicationSettings < ActiveRecord::Migr
disable_ddl_transaction! disable_ddl_transaction!
def up def up
cleanup_concurrent_column_rename :application_settings, # This migration has been made a no-op in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56352
:asset_proxy_whitelist, # because to revert the rename in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55419 we need
:asset_proxy_allowlist # to cleanup the triggers on the `asset_proxy_allowlist` column. As such, this migration would do nothing.
end end
def down def down
undo_cleanup_concurrent_column_rename :application_settings, # no-op
:asset_proxy_whitelist,
:asset_proxy_allowlist
end end
end end
---
title: Fix zero-downtime upgrade from 13.8.x to 13.9.3
merge_request: 56352
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment