Skip to content

wahanegi/fix-db-schema-conflicts

 
 

Repository files navigation

fix-db-schema-conflicts

This is a modification of fix-db-schema-conflicts to enable it to work effectively with two databases.

  1. The secondary database should have all tables prepended with something like second_. For example second_users, second_services, etc.
  2. The app that is using the gem should store this prepend name (_second) in an environmental variable PRECEDES_SECONDARY_DB_TABLE_NAMES.

The output schemas will be db/schema.rb and db/second_schema.rb. In the second_schema.rb, only tables that start with _second will be present, and none of those will be present in the db/schema.rb file.

If you aren't familiar with the original gem, please read the original README here.

Installation

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

gem 'fix-db-schema-conflicts', git: 'git@github.com:wahanegi/fix-db-schema-conflicts'

And then execute:

$ bundle

Contributors

Releases

  • 3.2.0
    • Modifications to allow dual database schemas (rogergraves)
  • 3.1.0
    • Added support for ruby 3 (cabello)
    • Added support for new Rubocop 0.77+ schema (justisb)
  • 3.0.3
    • Added support for new Rubocop 0.53+ schema (rosscooperman)
  • 3.0.2
    • Added support for new Rubocop 0.49+ schema (amckinnell)
  • 3.0.1
    • Improve formatting to be more consistent (amckinnell)
    • Bump rake dependency to bypass a rake bug in older version (amckinnell)
  • 3.0.0
    • Only support Ruby 2.2+ since lower versions haved reached EOL.
  • 2.0.1
    • Fix bug that caused failure when project directory has a space in it
  • 2.0.0
    • Allow usage of Rubocop >= 0.38.0
    • Remove Rails 5 deprecation warnings for using alias_method_chain
    • This upgrade breaks compatibility with Ruby 1.9x since 1.9x lacks #prepend
  • 1.2.2
    • Remove dependency on sed
  • 1.2.1
    • Upgrade Rubocop to get major performance boost
    • Add support for sorting of extensions
    • Fix spacing regression introduced by Rubocop upgrade
    • Add test suite and an integration test

About

Modified for customized use, based on database separation of a specific application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 83.8%
  • HTML 12.7%
  • CSS 1.8%
  • JavaScript 1.7%