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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-08 21:09:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-08 21:09:16 +0300
commit80e9fdc9682cfbcfb9202a2733605a6a6bd23f05 (patch)
tree168375ea13d1a1f01d4cbcf6f0513fc9883e9477 /doc/development
parent5372e109c0660e4670aa987568a51082beca1b3c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development')
-rw-r--r--doc/development/foreign_keys.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/development/foreign_keys.md b/doc/development/foreign_keys.md
index 38b60ce6f0b..508e5665f08 100644
--- a/doc/development/foreign_keys.md
+++ b/doc/development/foreign_keys.md
@@ -87,3 +87,13 @@ create_table :user_configs, id: false do |t|
...
end
```
+
+You will also need to add the new primary key to the model:
+
+```ruby
+class UserConfig < ActiveRecord::Base
+ self.primary_key = :user_id
+
+ belongs_to :user
+end
+```