Skip to content

Add new checker for tables without default timestamp columns#197

Merged
gregnavis merged 1 commit intogregnavis:masterfrom
fatkodima:table_without_timestamps
Jan 3, 2025
Merged

Add new checker for tables without default timestamp columns#197
gregnavis merged 1 commit intogregnavis:masterfrom
fatkodima:table_without_timestamps

Conversation

@fatkodima
Copy link
Contributor

Just found a few tables in our app not having created_at/updated_at columns. This was done accidentally. Now, without these columns it is hard to tell if the table is used or not.

In 99.9% of cases, tables should have these columns. Without them, it is also impossible to know when the record was created/updated (which can greatly help debugging). Also the use of Rails automatic cache expiration based on updated_at column is impossible.

@gregnavis gregnavis added the new detector A detector for a new kind of problem. label Dec 12, 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.

Love it!

@gregnavis gregnavis merged commit a1e60f9 into gregnavis:master Jan 3, 2025
@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.

2 participants