If you’ve ever wanted to take advantage of Active Record’s powerful migrations functionality without the need for a Rails application, here’s how to do it.
Rather than go through all the details here, I’ve created a small github repository with a fully-functional demo. It’s easy to follow and has comments throughout the code. In fact, there’s very little code at all!
Here’s what you’ll get:
- Active Record migrations without a Rails web application
- A stripped-down list of available Rake tasks – only the ones you need. No filler.
- A clean, DSL-like syntax for generating new migrations, all through the use of Rake tasks.
Hopefully this will prove to be useful – we’re about to roll this out to our production environments (with a few mods).
Here’s the code: https://github.com/edjames/ar_migrations