Skip to content

Conversation

tmaier
Copy link
Contributor

@tmaier tmaier commented Mar 15, 2024

This is a minor thing in my opinion.

I use active_record_doctor to identify potential database issues or risks.

When I run $ bin/rake active_record_doctor after I added flipper-active_record, I received the following recommendations:

add a `presence` validator to Flipper::Adapters::ActiveRecord::Gate.feature_key - it's NOT NULL but lacks a validator
add a `presence` validator to Flipper::Adapters::ActiveRecord::Gate.key - it's NOT NULL but lacks a validator
add a `presence` validator to Flipper::Adapters::ActiveRecord::Feature.key - it's NOT NULL but lacks a validator

Ref. https://github.com/gregnavis/active_record_doctor?tab=readme-ov-file#detecting-missing-presence-validations

This pull request adds these validators.

@bkeepers bkeepers merged commit 4d416c4 into flippercloud:main Mar 15, 2024
@bkeepers
Copy link
Collaborator

Thanks @tmaier!

@tmaier tmaier deleted the patch-1 branch March 16, 2024 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants