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:
Diffstat (limited to 'db/migrate/20230629113029_validate_fk_ml_candidates_on_user_id.rb')
-rw-r--r--db/migrate/20230629113029_validate_fk_ml_candidates_on_user_id.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20230629113029_validate_fk_ml_candidates_on_user_id.rb b/db/migrate/20230629113029_validate_fk_ml_candidates_on_user_id.rb
new file mode 100644
index 00000000000..dce7f8eeb47
--- /dev/null
+++ b/db/migrate/20230629113029_validate_fk_ml_candidates_on_user_id.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class ValidateFkMlCandidatesOnUserId < Gitlab::Database::Migration[2.1]
+ NEW_CONSTRAINT_NAME = 'fk_ml_candidates_on_user_id'
+
+ def up
+ validate_foreign_key(:ml_candidates, :user_id, name: NEW_CONSTRAINT_NAME)
+ end
+
+ def down
+ # no-op
+ end
+end