0.01
No commit activity in last 3 years
No release in over 3 years
Migration tool from external database's DDL
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
>= 0
~> 10.0
>= 0
>= 0

Runtime

= 3.3.0
>= 4.0.0
 Project Readme

DBSupplier

Build Status

Migration tool from external database's DDL. Fetch sql from GitHub repository and migrate local database.

demo

Installation

Add this line to your application's Gemfile:

gem 'db_supplier'

And then execute:

$ bundle

Usage

Add gem to your Gemfile then defined some 'rake tasks'.

$ rake -T
rake db:supplier:defined     # show migration target databases
rake db:supplier:migrate     # Migrate database from DDL files of unmanaged in the Rails App
rake db:supplier:migrate:sql # Show DDL files of unmanaged in the Rails App

Configurations

Add your Rails Application's config/environments/*.rb

example: RAILS_ENV=development

config/environments/development.rb

Rails.application.configure do
  DBSupplier::Migrator.configurations = {
    schema_repository: 'username/reponame',
    access_token: 'your github access token',
    schema_files: {
      databasename: ['path/to/ddl.sql']
    }
  }
end

params

schema_repository: DDL Repository

access_token: Your github access token

schema_files: Some pair of database name and ddl file(s)

Contributing

  1. Fork it ( https://github.com/ryopeko/db_supplier/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request