Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/calavera/migrations

run Rails migrations from Java
https://github.com/calavera/migrations

Last synced: 11 days ago
JSON representation

run Rails migrations from Java

Awesome Lists containing this project

README

        

Migrations
==========

Run Rails migrations from Java.

Small utility to run Rails migrations from Java, inspired by Yoko's post on
how to package rubygems in a jar file:

http://yokolet.blogspot.com/2010/10/gems-in-jar-with-redbridge.html

Usage
=====

1. Put your Rails migrations under this directory:

src/main/resources/db/migrate

2 Create the jar file:

jruby -S rake migrations:bundle ant:jar

3 Run migrations:

java -Dmigrations.db.name=DB_NAME -cp jruby-complete.jar:migrations-0.1.0.jar migrations.Migrate [OPTIONAL_VERSION_NUMBER]

Restrictions
============

Due to this already resolved bug this library only works with JRuby's trunk version:

http://jira.codehaus.org/browse/JRUBY-5155

Todo
====

- It's not too much overengineered, let's do it!