The project is in a healthy, maintained state
Add deadlines to Active Record `ignored_columns`
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

 Project Readme

SmartIgnoredColumns

Motivational tweet

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:

gem "smart_ignored_columns", group: [:development, :test]

Usage

  1. Specify deadlines when ignoring columns:
class User < ApplicationRecord
  self.ignored_columns += [
    { name: "first_name", remove_after: "2025-08-24" } # date can be a String or a Date
  ]
end
  1. Run a check on CI to warn when it is time to remove ignored columns:
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:

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.

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.