Posts Tagged ‘database’
Rails migration without ssh access…
(New blog! Woo!)
So, my preferred web host kinda supports Ruby on Rails, but only up to a point. There’s no shell access, so it’s all ftp-only. Which is fine, until you need to migrate your database back and forth…
Anyway, a quick-and-dirty solution is to make a ‘migration-controller’ to do the migrations remotely. Just hit the URL http://{host}/migration, enter the requred migration version number and your ultra-secret password and it’ll do the migration for you.
Do be aware of the dangers of having a publicly-accessible controller like this - I make sure I delete the controller from the production environment whenever I’m done with it.
Code attached…
Tags: database, migration, rails
Filed under Ruby on Rails :
Comments (3) :
Dec 3rd, 2007