We are in the development phase of a rails app which is hosted as war
in GlassFish. Deployment works well, except for the migration part
(which requires manual interaction).
My question:
is it “acceptable” to run migrations upon boot OR by invoking them
from within an admin page?
We are in the development phase of a rails app which is hosted as war
in GlassFish. Deployment works well, except for the migration part
(which requires manual interaction).
My question:
is it “acceptable” to run migrations upon boot OR by invoking them
from within an admin page?
If you ran them from the admin page then at the very least you would
need to call reset_column_information on all your model classes (in
all instances of your application)
My question:
is it “acceptable” to run migrations upon boot OR by invoking them
from within an admin page?
If you ran them from the admin page then at the very least you would
need to call reset_column_information on all your model classes (in
all instances of your application)
Fred
Dear Fred,
does this also apply to calling migrations upon boot, or woud that be
“safe”?
if (ActiveRecord::Migrator.new(:up, ‘db/
migrate’).pending_migrations.length > 0)
ActiveRecord::Migration.verbose = false
ActiveRecord::Migrator.migrate(“db/migrate/”, nil)
end
Depends what you mean by on boot. Would each instance of the app try
and run the migrations ? That would probably result in bad stuff.
didn’t htink about this (mongrel cluster…)
you could still write a script that copies the war to the servlet
container, restarts it and runs “rake db:migrate RAILS_ENV=whatever”
but all the rails sources are IN the war…? Where should I run rake?