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.
gem "schema_plus_tables" # in a Gemfile gem.add_dependency "schema_plus_tables" # in a .gemspec
drop_table if exists
SchemaPlus::Tables adds the
ActiveRecord::Migration.drop_table "table_name", if_exists: true
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:
SchemaPlus::Tables is tested on:
- ruby 2.1.5 with activerecord 4.2, using mysql2, sqlite3 or postgresql
- 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:
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 --helpor the schema_dev README.
The matrix of configurations is specified in
schema_dev.ymlin 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.