I have a nice new Hobo app, and a big wad of legacy data that I'd like
to feed it with. I'm sure you all know how mind-numbingly dull it is
to write data migrations.
So, get Hobo to do the legwork for you! It will prompt you for all
the tedious add / drops / renames so that all you need to worry about
is the complex fun stuff.
This works great as long as your schemas aren't too wildly different.
Here are the steps:
You're going to be making some temporary modifications so do it on a branch
git checkout -b import
Tell Rails to use your legacy database.
vi config/database.yml
development:
adapter: mysql
encoding: utf8
database: backend
username: backend
password: osnap
Get rid of any existing migrations
git rm db/migrate/* db/schema.rb
git add config/database.yml
git commit
Now, ask Hobo to write your data migration for you
script/generate hobo_migration
Hobo prompts you for each drop and rename. Spend 10 minutes selecting
names and you're done. It's sooo much easier!
I just thought this was a neat use of Hobo migrations, probably saved
me an hour of manually cross-referencing table and fields names.
Thanks Hobo!
- Scott
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---