Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ignored_columns_tasks

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ignored_columns_tasks

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Ignored Columns Tasks

Rails tasks for managing Active Record ignored columns.

Installation

Add this line to your application's Gemfile in the :development group:

group :development do
  gem "ignored_columns_tasks"
end

Usage

All functionality is provided as Rake tasks.

Generating a Migration to Drop Ignored Columns

This will generate (but not run!) migrations to drop columns currently being ignored. One migration is generated per model:

./bin/rails ignored_columns:migration

If you have ignored columns that must not be dropped add them to the SKIP_COLUMNS environment variable:

./bin/rails ignored_columns:migration SKIP_COLUMNS="some_column,another_column"

You can set this once for your project instead of specifying it every time. In this case it is recommended to use the IGNORED_COLUMNS_TASKS_SKIP_COLUMNS environment variable:

export IGNORED_COLUMNS_TASKS_SKIP_COLUMNS="some_column,another_column"

This task can also be limited to a single model by setting the MODEL environment variable:

./bin/rails ignored_columns:migration MODEL=User
Strong Migrations

If your project uses Strong Migrations the remove_column call will be wrapped in a safety_assured block.

Ignored Columns That Have Been Dropped From Your Database

This will print ignored columns that no longer exist the database:

./bin/rails ignored_columns:dropped

This can be limited to a single model via the MODEL environment variable:

./bin/rails ignored_columns:dropped MODEL=User

Author

Skye Shaw (skye.shaw +AT+ gmail)

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 31 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc