Skip to content

Check timestamp columns (created_at, updated_at) are NOT NULL#186

Merged
gregnavis merged 1 commit intogregnavis:masterfrom
jdufresne:timestamps-not-null
Jan 3, 2025
Merged

Check timestamp columns (created_at, updated_at) are NOT NULL#186
gregnavis merged 1 commit intogregnavis:masterfrom
jdufresne:timestamps-not-null

Conversation

@jdufresne
Copy link
Contributor

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

Copy link
Owner

@gregnavis gregnavis left a 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.

@gregnavis gregnavis added new detector A detector for a new kind of problem. waiting labels Sep 3, 2024
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
@jdufresne jdufresne requested a review from gregnavis September 5, 2024 11:22
@gregnavis gregnavis removed the waiting label Sep 5, 2024
Copy link
Owner

@gregnavis gregnavis left a 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?

@fatkodima
Copy link
Contributor

Lgtm 👍

@gregnavis gregnavis force-pushed the master branch 3 times, most recently from afcda83 to 4ee897c Compare November 10, 2024 14:43
@gregnavis gregnavis merged commit ad7f04a into gregnavis:master Jan 3, 2025
@jdufresne jdufresne deleted the timestamps-not-null branch January 3, 2025 12:36
@gregnavis gregnavis added this to the 2.0 milestone Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new detector A detector for a new kind of problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Idea: timestamps (created_at, updated_at) should be NOT NULL

3 participants