Commit 8b4644db authored by Toon Claes's avatar Toon Claes

Merge branch '35223-drop-unused-user-id-column-on-cluster-providers-aws' into 'master'

Remove unused cluster_providers_aws.created_by_user_id column

See merge request gitlab-org/gitlab!43064
parents b07ee32e 138d6f7c
---
title: Remove unused cluster_providers_aws.created_by_user_id column
merge_request: 43064
author:
type: other
# frozen_string_literal: true
class RemoveCreatedByUserIdFromClusterProvidersAws < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_cluster_providers_aws_on_created_by_user_id'
disable_ddl_transaction!
def up
with_lock_retries do
remove_column :cluster_providers_aws, :created_by_user_id
end
end
def down
unless column_exists?(:cluster_providers_aws, :created_by_user_id)
add_column :cluster_providers_aws, :created_by_user_id, :integer
end
add_concurrent_index :cluster_providers_aws, :created_by_user_id, name: INDEX_NAME
add_concurrent_foreign_key :cluster_providers_aws, :users, column: :created_by_user_id, on_delete: :nullify
end
end
0019105cd2112e138b9926dc000b0c54b41fca6dfb2c4f658900040e0ecb3b70
\ No newline at end of file
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