Project

dbmigrator

0.0
No commit activity in last 3 years
No release in over 3 years
Standalone migrator for non Rails projects
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

= 3.2.12
= 3.2.12
= 10.0.2
 Project Readme

Rails migration in non-Rails projects.

USAGE

Install Ruby 1.9 and your database adapter (e.g. gem install pg) then:

gem install "dbmigrator"

This gems allows only migrate the existing database. We turned off db:create and db:drop due to security issues.

To create migration you should use the folling command:

rake db:migrations:new GROUP=items NAME=add_new_column

This command creates migration with name add_new_column within items group.

To migrate items group use the following command:

rake db:migrate DATABASE_URL=postgres://user:password@host/database GROUP=items

This command applies migrations within items group to database postgres://user:password@host/database

dbmigrator uses sql schema format ActiveRecord::Base.schema_format = :sql. In other words we produce pure sql dumps after db:migrate and use this dump in db:setup task