OrientdbSchemaMigrator
Migrate Orientdb schema.
Uses a schema_versions
class to keep track of migrations.
Installation
Add this line to your application's Gemfile:
gem 'orientdb-schema-migrator'
And then execute:
$ bundle
Or install it yourself as:
$ gem install orientdb-schema-migrator
Usage
Create Migration
rake odb:generate_migration migration_name=CreateFoos
Migrate
rake odb:migrate
Rollback
Rollback (one migration at a time).
rake odb:rollback
Testing
- Install OrientDb and run it locally.
- Create a database named
schema_test
with an admin user namedtest
, passwordtest
(or provide your own credentials via environment variables). You can test that this is correctly setup withrake odb:test_connection
. ODB_TEST=true bundle exec rake odb:add_schema_class
bundle exec rake spec
Contributing
- Fork it ( https://github.com/Headlinerfm/orientdb-schema-migrator/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request