forked from lobsters/lobsters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.active_record_doctor.rb
45 lines (41 loc) · 1006 Bytes
/
.active_record_doctor.rb
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
# typed: false
ActiveRecordDoctor.configure do
detector :unindexed_foreign_keys,
ignore_columns: [
"hats.short_id",
"mastodon_apps.client_id",
"stories.twitter_id"
]
detector :missing_foreign_keys,
ignore_columns: [
"comments.short_id",
"comments.thread_id",
"hats.short_id",
"mastodon_apps.client_id",
"messages.short_id",
"stories.mastodon_id",
"stories.short_id",
"stories.twitter_id"
]
detector :missing_presence_validation,
ignore_models: [
"ActiveStorage::Attachment",
"ActiveStorage::Blob",
"ActiveStorage::VariantRecord",
"ReplyingComment"
],
ignore_attributes: [
"Keystore.id"
]
detector :incorrect_length_validation,
ignore_models: [
"ActiveStorage::Attachment",
"ActiveStorage::Blob",
"ActiveStorage::VariantRecord",
"ReplyingComment"
],
ignore_attributes: [
"User.password_digest",
"Vote.reason"
]
end