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

schema_plus_tables

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

schema_plus_tables

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Gem Version Build Status Coverage Status Dependency Status

SchemaPlus::Tables

SchemaPlus::Tables adds useful features to ActiveSupport's handling of tables. (Actually, only one for now)

SchemaPlus::Tables is part of the SchemaPlus family of Ruby on Rails extension gems.

Installation

As usual:

gem "schema_plus_tables"                # in a Gemfile
gem.add_dependency "schema_plus_tables" # in a .gemspec

Usage

drop_table if exists

SchemaPlus::Tables adds the if_exists: option:

ActiveRecord::Migration.drop_table "table_name", if_exists: true

Deprecations

SchemaPlus 1.8.x provided some options and accessors that are now available in ActiveRecord 4.2, but in slightly different form. SchemaPlus::Tables still supports the SchemaPlus 1.8.x form but issues deprecation warnings in favor of the rails form:

  • Migration.drop_table deprecates option
    • cascade: true => force: :cascade

Compatibility

SchemaPlus::Tables is tested on:

  • ruby 2.1.5 with activerecord 4.2, using mysql2, sqlite3 or postgresql

History

  • 0.1.1 - Update schema_plus_core and schema_dev dependencies
  • 0.1.0 - Initial release, extracted from SchemaPlus 1.x

Development & Testing

Are you interested in contributing to SchemaPlus::Tables? Thanks! Please follow the standard protocol: fork, feature branch, develop, push, and issue pull request.

Some things to know about to help you develop and test:

  • schema_dev: SchemaPlus::Tables uses schema_dev to facilitate running rspec tests on the matrix of ruby, activerecord, and database versions that the gem supports, both locally and on travis-ci

    To to run rspec locally on the full matrix, do:

      $ schema_dev bundle install
      $ schema_dev rspec
    

    You can also run on just one configuration at a time; For info, see schema_dev --help or the schema_dev README.

    The matrix of configurations is specified in schema_dev.yml in the project root.

  • schema_plus_core: SchemaPlus::Tables uses the SchemaPlus::Core API that provides middleware callback stacks to make it easy to extend ActiveRecord's behavior. If that API is missing something you need for your contribution, please head over to schema_plus_core and open an issue or pull request.
  • schema_monkey: SchemaPlus::Tables is implemented as a schema_monkey client, using schema_monkey's convention-based protocols for extending ActiveRecord and using middleware stacks.

FAQs

Package last updated on 24 Mar 2016

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