gitlab-org--gitlab-foss/spec/lib
Yorick Peterse 79696f5b7a
Hash concurrent foreign key names similar to Rails
This was initially not implemented simply because I forgot about the
size limit of constraint names in PostgreSQL (63 bytes). Using the old
technique we can't add foreign keys for certain tables. For example,
adding a foreign key on
protected_branch_merge_access_levels.protected_branch_id would lead to
the following key name:

    fk_protected_branch_merge_access_levels_protected_branches_protected_branch_id

This key is 78 bytes long, thus violating the PostgreSQL size
requirements.

The hashing strategy is copied from Rails' foreign_key_name() method,
which unfortunately is private and subject to change without notice.
2017-02-21 15:07:02 +01:00
..
api/helpers
banzai Only yield valid references in ReferenceFilter.references_in 2017-02-16 14:06:24 -06:00
bitbucket
ci Make sure our current .gitlab-ci.yml is valid 2017-02-10 16:33:10 +08:00
constraints Use :empty_project where possible throughout spec/lib 2017-01-25 12:25:42 -05:00
container_registry
gitlab Hash concurrent foreign key names similar to Rails 2017-02-21 15:07:02 +01:00
json_web_token
mattermost Incorporate feedback 2017-01-30 09:25:15 +01:00
additional_email_headers_interceptor_spec.rb Set Auto-Submitted: auto-generated header to emails 2017-02-15 23:15:48 +05:00
disable_email_interceptor_spec.rb
event_filter_spec.rb Add traits for the different Event types to the Event factory 2017-02-01 16:02:03 -05:00
expand_variables_spec.rb
extracts_path_spec.rb Use :empty_project where possible throughout spec/lib 2017-01-25 12:25:42 -05:00
file_size_validator_spec.rb
git_ref_validator_spec.rb
gitlab_spec.rb
light_url_builder_spec.rb Use :empty_project where possible throughout spec/lib 2017-01-25 12:25:42 -05:00
repository_cache_spec.rb Use :empty_project where possible throughout spec/lib 2017-01-25 12:25:42 -05:00