https://github.com/fatkodima/smart_ignored_columns
Add deadlines to Active Record `ignored_columns`
https://github.com/fatkodima/smart_ignored_columns
activerecord gem rails ruby
Last synced: 8 months ago
JSON representation
Add deadlines to Active Record `ignored_columns`
- Host: GitHub
- URL: https://github.com/fatkodima/smart_ignored_columns
- Owner: fatkodima
- License: mit
- Created: 2025-08-26T11:27:56.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-08-28T12:31:16.000Z (10 months ago)
- Last Synced: 2025-08-28T18:18:11.519Z (10 months ago)
- Topics: activerecord, gem, rails, ruby
- Language: Ruby
- Homepage:
- Size: 128 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# SmartIgnoredColumns
[
](https://x.com/ciaran_lee/status/1953084875193385200)
Now you won't forget to delete those ignored columns.
## Requirements
- ruby 3.2+
- activerecord 7.2+
## Installation
Add this line to your application's Gemfile:
```ruby
gem "smart_ignored_columns", group: [:development, :test]
```
## Usage
1. Specify deadlines when ignoring columns:
```ruby
class User < ApplicationRecord
self.ignored_columns += [
{ name: "first_name", remove_after: "2025-08-24" } # date can be a String or a Date
]
end
```
2. Run a check on CI to warn when it is time to remove ignored columns:
```sh
bundle exec rake smart_ignored_columns:obsolete
```
If there are any obsolete ignored columns, the check will print them and exit with an error status code.
If you want to print all ignored columns with their deadlines, run:
```sh
bundle exec rake smart_ignored_columns:list
```
## Development
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/fatkodima/smart_ignored_columns.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).