summaryrefslogtreecommitdiff
path: root/doc/development/migration_style_guide.md
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2018-11-16 09:38:58 -0600
committerClement Ho <ClemMakesApps@gmail.com>2018-11-16 09:38:58 -0600
commite5d4f7ff277289af8fbffd392bc216ffb2d1d873 (patch)
tree102f0a450c2476da80fa39649aed522c732b72f2 /doc/development/migration_style_guide.md
parent17d53e2bf5f9ec44d56bf92daf972007fc5f9bff (diff)
parent624ec62238c1d26ef2745c1147edffde67a2b4e6 (diff)
downloadgitlab-ce-npm-namespace.tar.gz
Merge branch 'master' into npm-namespacenpm-namespace
Diffstat (limited to 'doc/development/migration_style_guide.md')
-rw-r--r--doc/development/migration_style_guide.md7
1 files changed, 1 insertions, 6 deletions
diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md
index 6f31e5b82e5..e4e532bb4ed 100644
--- a/doc/development/migration_style_guide.md
+++ b/doc/development/migration_style_guide.md
@@ -187,12 +187,7 @@ end
When adding a foreign-key constraint to either an existing or new
column remember to also add a index on the column.
-This is _required_ if the foreign-key constraint specifies
-`ON DELETE CASCADE` or `ON DELETE SET NULL` behavior. On a cascading
-delete, the [corresponding record needs to be retrieved using an
-index](https://www.cybertec-postgresql.com/en/postgresql-indexes-and-foreign-keys/)
-(otherwise, we'd need to scan the whole table) for subsequent update or
-deletion.
+This is _required_ for all foreign-keys.
Here's an example where we add a new column with a foreign key
constraint. Note it includes `index: true` to create an index for it.