Commit d5447ebb authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'sabrams-master-patch-37408' into 'master'

Add the 'why' for alternative primary key options

See merge request gitlab-org/gitlab!50302
parents ae5bc2d1 f8203de9
......@@ -105,6 +105,8 @@ create_table :user_configs, id: false do |t|
end
```
Setting `default: nil` will ensure a primary key sequence is not created, and since the primary key
will automatically get an index, we set `index: false` to avoid creating a duplicate.
You will also need to add the new primary key to the model:
```ruby
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment