https://github.com/keredson/ruby-db-evolve
been using it in production for ~1y now.
https://github.com/keredson/ruby-db-evolve
been using it in production for ~1y now.
It would make more sense if your gem would generate migrations from schema.rb changes.
Also, that rant at the end of README kinda shows that you're hating the tool you're trying to use. Why not use another? You are not tied to ActiveRecord.
I'm not trying to say that migrations are flawless as a tool. I've faced at least one major problem with them. But still.
(1) If your data migrations are not "occasional" (and I mean very occasional) that's a sign you're doing a poor job at modeling your data. Splitting one column into two is almost always an example of someone really f-ing up the original schema.
Think of it this way: how do you switch branches? Do you look up the most recent ancestor, check it out, migrate down to it, then back up the new branch? It's so hard I don't know any rails devs who actually do it. But with a my tool it's a one-line command. PRs w/ schema changes actually get tested now, not just eyeballed.
Also, did you even read the "rant"? Do you seriously like the proposed version control tool modeled after rail's migrations? ;)
As of occasional (or not) data migrations, it depends on project and its history. If project is live, rapidly developed and has faced couple of pivots, migration history will reflect it.
If automated deployment is not your case I strongly recommend it. Since I first time managed autodeploy to work properly I've never looked back. It is SO convenient.
I may be wrong again about your processes and configuration :)
Executing in 3...2...1...
BEGIN TRANSACTION
-- column changes for table products
ALTER TABLE "products" ADD COLUMN "dont_email_on_purchase" boolean
-- column changes for table searches
ALTER TABLE "searches" ADD COLUMN "tag_only" boolean DEFAULT 'f'
COMMIT
--==[ COMPLETED ]==--
from the one line code change that triggered it: 1 db/schema.rb
@@ -543,6 +543,7 @@
create_table "searches", :force => true do |t|
t.text "query"
+ t.boolean "tag_only", :default => false
t.datetime "searched_at"
t.integer "user_id"
t.integer "page_id"
(well, there were two commits obviously)rather than call "./manage.py syncdb", call "./manage.py evolvedb" and changes to your models will be synced to your schema non-destructively. (ie: without dropping and re-building the table)