diff options
Diffstat (limited to 'doc/development/database/add_foreign_key_to_existing_column.md')
-rw-r--r-- | doc/development/database/add_foreign_key_to_existing_column.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/development/database/add_foreign_key_to_existing_column.md b/doc/development/database/add_foreign_key_to_existing_column.md index 85411ff9aa7..a5d40d455d8 100644 --- a/doc/development/database/add_foreign_key_to_existing_column.md +++ b/doc/development/database/add_foreign_key_to_existing_column.md @@ -1,7 +1,7 @@ --- stage: Enablement group: Database -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments --- # Adding foreign key constraint to an existing column @@ -79,7 +79,7 @@ class AddNotValidForeignKeyToEmailsUser < ActiveRecord::Migration[5.2] end ``` -CAUTION: **Caution:** +WARNING: Avoid using the `add_foreign_key` constraint more than once per migration file, unless the source and target tables are identical. #### Data migration to fix existing records @@ -119,7 +119,7 @@ end Validating the foreign key will scan the whole table and make sure that each relation is correct. -NOTE: **Note:** +NOTE: When using [background migrations](../background_migrations.md), foreign key validation should happen in the next GitLab release. Migration file for validating the foreign key: |