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

https://github.com/sgtfloyd/activerecord-db-tasks

Rake db tasks for ActiveRecord sans Rails
https://github.com/sgtfloyd/activerecord-db-tasks

activerecord rake ruby

Last synced: 8 months ago
JSON representation

Rake db tasks for ActiveRecord sans Rails

Awesome Lists containing this project

README

          

activerecord-db-tasks
=====================
Rake db management tasks for projects that use ActiveRecord without Rails.
`rake db:create`, `rake db:migrate`, etc.

Usage
-----
**Install the gem:** `gem install activerecord-db-tasks`
**Include it in your Rakefile:** `require 'activerecord-db/tasks'`

Tasks
-----
```bash
rake db:create # Create the database in config/database.yml
rake db:drop # Drops the database in config/database.yml
rake db:forward # Pushes the schema to the next version (specify steps w/ STEP=n).
rake db:migrate # Migrate the database (target specific version with VERSION=x).
rake db:migrate:down # Runs the "down" for a given migration VERSION.
rake db:migrate:redo # Rollback the database one migration and re migrate up (options: STEP=x, VERSION=x).
rake db:migrate:up # Runs the "up" for a given migration VERSION.
rake db:reset # Resets your database using your migrations.
rake db:rollback # Rolls the schema back to the previous version (specify steps w/ STEP=n).
rake db:version # Retrieves the current schema version number.
```