-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check timestamp columns (created_at, updated_at) are NOT NULL #186
base: master
Are you sure you want to change the base?
Conversation
b44c5c6
to
b6a657f
Compare
lib/active_record_doctor/detectors/missing_non_null_constraint.rb
Outdated
Show resolved
Hide resolved
b6a657f
to
e62b314
Compare
lib/active_record_doctor/detectors/missing_non_null_constraint.rb
Outdated
Show resolved
Hide resolved
e62b314
to
18efe4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution, @jdufresne. I appreciate the effort you put into creating a PR.
I left one small comment that will hopefully improve DX.
lib/active_record_doctor/detectors/missing_non_null_constraint.rb
Outdated
Show resolved
Hide resolved
Once the timestamps columns are established on a table, they might as well be NOT NULL to enforce their existence. All ActiveRecord operations set these values so they will always exist under normal usage. Fixes gregnavis#184
18efe4a
to
d0fc304
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution, @jdufresne.
@fatkodima, could you resolve the outstanding conversations if your concerns were addressed?
Lgtm 👍 |
Once the timestamps columns are established on a table, they might as well be NOT NULL to enforce their existence. All ActiveRecord operations set these values so they will always exist under normal usage.
Fixes #184