Execute a Rake task from within migration?
Posted
by Fabiano PS
on Stack Overflow
See other posts from Stack Overflow
or by Fabiano PS
Published on 2010-04-13T18:30:41Z
Indexed on
2010/04/13
18:33 UTC
Read the original article
Hit count: 492
I have a Rake task that loads configuration data into the DB from a file, is there a correct ruby/rails way to call it on a migration up?
My objective is to sync my team DB configs, without have to broadcast then to run the migration lalala
def self.up
change_table :fis_situacao_fiscal do |t|
t.remove :mostrar_endereco
t.rename :serie, :modelo
end
Faturamento::Cfop.destroy_all()
#perform rake here !
end
btw: Admins could clean up some tags? there is 'migrations' and 'migration', same as 'ruby-on-rails' and 'rails'
© Stack Overflow or respective owner