Your Rails app classes are accessible in migrations, so you can call the
bit.ly link generator just like you would from the application itself.
Thanks for the info, did not know this before.
At this point, stop asking questions and go write some migration code.
If you run into trouble, then come back, ask, and post the code you
have. We could talk about this all year, but now is the time for code.
I would love to start coding, but want to have all my ducks in a row
that i do it right.
But this is exactly a migration. It gets the database from one
consistent state to the next. That’s the definition of a migration.
You were told it would be possible, not advisable.
Thanks for the clarification and making a very strong point.
No. If you redeploy the app to a new server, you shouldn’t be running
the old migrations. The preferred way to do initial DB setup is with
rake db:schema:load. Migrations are only for DB changes.
Did not know this as have not reached that point yet and have not come
across the issue. I learn and appreciate ruby more and more every day.
I don’t know why you’re being so resistant to migrations when you’re
doing the exact task they were meant for.
Not being resistant at all, just learning. The role of migrations is
much more clear to me now so will be fairly confident to play with them.
Just as you said time to code, and then come back with questions.
Thanks for all the help guys.