-
Notifications
You must be signed in to change notification settings - Fork 21
/
.database_consistency.yml
72 lines (68 loc) · 2.67 KB
/
.database_consistency.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# https://github.com/djezzzl/database_consistency/wiki/configuration
DatabaseConsistencySettings:
color: true # Brings color tags to console output.
# Ignore false positive from Rails' ActionText and ActiveStorage
ActionText::RichText:
enabled: false
ActiveStorage::Attachment:
enabled: false
ActiveStorage::Blob:
enabled: false
ActiveStorage::VariantRecord:
enabled: false
# Disable rules for the whole service
DatabaseConsistencyCheckers:
# This would require to add specific DB deletion strategy for foreign keys to match the ActiveRecord association
# deletion strategy. I think this is an overkill. But we can revisit it in the future if we want to.
ForeignKeyCascadeChecker:
enabled: false
# Disable the whole rule since is something that we especifically need (unaswered boolean questions for users) in
# multiple fields
ThreeStateBooleanChecker:
enabled: false
# Ignore missing uniqueness validations on IDs coming from GIAS DB
# as there is a on_duplicate_key_update in place to deal with conflicts during the import.
SchoolGroupMembership:
index_school_group_memberships_on_school_id_and_school_group_id:
UniqueIndexChecker:
enabled: false
Organisation:
index_organisations_on_local_authority_code:
UniqueIndexChecker:
enabled: false
index_organisations_on_uid:
UniqueIndexChecker:
enabled: false
index_organisations_on_urn:
UniqueIndexChecker:
enabled: false
# Generated by friendly_id gem. We don't need to model validate it.
index_organisations_on_slug:
UniqueIndexChecker:
enabled: false
# Publishers are created/populated in the background from DSI service, so we don't need to validate it at model level.
Publisher:
index_publishers_on_oid:
UniqueIndexChecker:
enabled: false
# The DB Unique index already grants no duplicate records will be created. But usually we still want to validate it
# in the model to show a proper validation message/error to the user or developer.
# In this case, we do not want to validate it in the model as this table is only used for a has_many_through relationship.
OrganisationVacancy:
index_organisation_vacancies_on_organisation_id_and_vacancy_id:
UniqueIndexChecker:
enabled: false
index_organisation_vacancies_on_vacancy_id_and_organisation_id:
UniqueIndexChecker:
enabled: false
# Devise tokens. We don't need to model validate their uniqueness. We can rely on DB unique index.
Jobseeker:
index_jobseekers_on_confirmation_token:
UniqueIndexChecker:
enabled: false
index_jobseekers_on_reset_password_token:
UniqueIndexChecker:
enabled: false
index_jobseekers_on_unlock_token:
UniqueIndexChecker:
enabled: false