ProductPromotion
Logo

Ruby

made by https://0x3d.site

GitHub - SchemaPlus/schema_plus: SchemaPlus provides a collection of enhancements and extensions to ActiveRecord
SchemaPlus provides a collection of enhancements and extensions to ActiveRecord - SchemaPlus/schema_plus
Visit Site

GitHub - SchemaPlus/schema_plus: SchemaPlus provides a collection of enhancements and extensions to ActiveRecord

GitHub - SchemaPlus/schema_plus: SchemaPlus provides a collection of enhancements and extensions to ActiveRecord

Notice (2022-05-13)

This wrapper gem is no longer being updated. Please use the individual gems for the functionality you need.

SchemaPlus family

The SchemaPlus family of gems provide various extensions and enhancements to ActiveRecord >= 4.2. There are two varieties:

  • Gems that provide new default automatic behavior

    These gems run with the spirit of DRY and convention over configuration -- and automatically take care of things for you. Just include any of these gems and they'll get to work.

    Gem Description
    schema_associations DRY up your models! Why manually define associations (and their inverses) in the models, when you've already defined those relations in the database?
    schema_auto_foreign_keys DRY up your migrations! It goes without saying that a foreign key relationship should have a foreign key constraint -- it should also go without typing.
    schema_validations DRY up your validations! The database has constraints in it, your models should automatically validate based on those constraints.
  • Gems that extend ActiveRecord's feature set

    These gems provide new features and capabilities to ActiveRecord that you may wish to take advantage of. None of these have default automagic; once you include the gem the new features are available, but you need to invoke them to use them.

    Gem Description
    schema_plus_columns Column attributes including column.indexes and column.unique?
    schema_plus_db_default Use ActiveRecord::DB_DEFAULT to set an attribute to the database default
    schema_plus_default_expr Use SQL expressions for database default values
    schema_plus_enums Define enum types in migrations
    schema_plus_foreign_keys Extended support for foreign keys, including creation as column options, :deferrable, and SQLite3 support
    schema_plus_indexes Convenience and consistency in using indexes
    schema_plus_multischema Support for using multiple PostgreSQL schemas in a single database
    schema_plus_pg_indexes PostgreSQL index features: case_insensitive, expression and operator_class
    schema_plus_tables Convenience and consistency in using tables
    schema_plus_views Create and drop views in migrations

See detailed documentation in each gem's README.

Is there some other capability you wish SchemaPlus had a gem for? Open an issue here. Or try implementing it yourself -- creating ActiveRecord extensions is easy and fun using SchemaPlus's tools schema_monkey and schema_plus_core!!


The schema_plus gem

Gem Version Build Status Coverage Status Dependency Status

The schema_plus gem (v2.0) is a wrapper that pulls in a collection of gems from the SchemaPlus family. For the most part we recommend skipping this gem and directly including the specific feature gems you're interested in using.

This wrapper is mostly provided for easy upgrade for those who were using schema_plus v1.8, which was a single monolothic gem. This wrapper pulls in the gems that provide the same set of features and automatic behavior as the previous version:

Note that the earlier version (1.x) supports earlier versions of ActiveRecord: 3.1, 4.0, 4.1, and 4.2.0. For more info about that version, see the schema_plus 1.x branch README.

Upgrading from schema_plus 1.8.x

schema_plus 2.0 intends to be a completely backwards-compatible drop-in replacement for SchemaPlus 1.8.x, through restricted to ActiveRecord >= 4.2 and Ruby >= 2.1

If you find any incompatibilities, please report an issue!

Deprecations

In cases where ActiveRecord 4.2 has introduced features previously supported only by SchemaPlus, but using different names, the SchemaPlus 2.0 family of gems now issue deprecation warnings in favor of the rails form. The complete list of deprecations:

  • Index definition deprecates these options:

    • :conditions => :where
    • :kind => :using
  • drop_table deprecates this option:

    • cascade: true => force: :cascade
  • Foreign key definitions deprecate options to :on_update and :on_delete:

    • :set_null => :nullify
  • add_foreign_key and remove_foreign_key deprecate the method signature:

    • (from_table, columns, to_table, primary_keys, options) => (from_table, to_table, options)
  • ForeignKeyDefinition deprecates accessors:

    • #table_name in favor of #from_table
    • #column_names in favor of Array.wrap(#column)
    • #references_column_names in favor of #primary_key
    • #references_table_name in favor of #to_table`
  • IndexDefinition deprecates accessors:

    • #conditions in favor of #where
    • #kind in favor of #using.to_s

Compatibility

SchemaPlus 2.x is tested against all combinations of:

  • ruby 2.1.5 with activerecord 4.2.0, using mysql2, sqlite3 or postgresql
  • ruby 2.1.5 with activerecord 4.2.1, using mysql2, sqlite3 or postgresql

Installation

Install from http://rubygems.org via

$ gem install "schema_plus"

or in a Gemfile

gem "schema_plus"

History

  • See CHANGELOG for per-version release notes.

  • SchemaPlus was originally derived from several "Red Hill On Rails" plugins created by @harukizaemon

  • SchemaPlus was created in 2011 by @mlomnicki and @ronen

  • And lots of contributors since then.

  • In 2015, the monolithic schema_plus gem was split into the SchemaPlus family of specific feature gems.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory