summaryrefslogtreecommitdiff
path: root/doc/development/migration_style_guide.md
diff options
context:
space:
mode:
authorAmit Rathi <amit@hypertrack.io>2018-11-19 23:12:52 +0530
committerAmit Rathi <amit@hypertrack.io>2018-11-19 23:12:52 +0530
commit1c7372ad56cf50b992a77bf0f09bee8fa29c2026 (patch)
tree2c40f9e265b7db9ea85900713d7e9d8b584732c3 /doc/development/migration_style_guide.md
parent9737cc8ab0f421213a5e36309741589beea88aa5 (diff)
parentaf1ed0e2bbabb72aff521aa2d67a4325dd94f711 (diff)
downloadgitlab-ce-1c7372ad56cf50b992a77bf0f09bee8fa29c2026.tar.gz
Merge branch 'master' into certmanager-temp
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.