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
- Host: GitHub
- URL: https://github.com/sgtfloyd/activerecord-db-tasks
- Owner: sgtFloyd
- Created: 2013-04-16T16:22:18.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-04-16T19:11:34.000Z (about 13 years ago)
- Last Synced: 2025-04-08T22:34:42.537Z (about 1 year ago)
- Topics: activerecord, rake, ruby
- Language: Ruby
- Size: 113 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.
```