diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /db/post_migrate/20230412201621_remove_clusters_applications_knative_fk.rb | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc42
Diffstat (limited to 'db/post_migrate/20230412201621_remove_clusters_applications_knative_fk.rb')
-rw-r--r-- | db/post_migrate/20230412201621_remove_clusters_applications_knative_fk.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/post_migrate/20230412201621_remove_clusters_applications_knative_fk.rb b/db/post_migrate/20230412201621_remove_clusters_applications_knative_fk.rb new file mode 100644 index 00000000000..8f97e886b85 --- /dev/null +++ b/db/post_migrate/20230412201621_remove_clusters_applications_knative_fk.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class RemoveClustersApplicationsKnativeFk < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + def up + with_lock_retries do + remove_foreign_key_if_exists(:clusters_applications_knative, column: :cluster_id) + end + end + + def down + add_concurrent_foreign_key :clusters_applications_knative, :clusters, + column: :cluster_id, on_delete: :cascade, name: 'fk_rails_54fc91e0a0' + end +end |