ruby on rails - rake db:migrate alter table name -
i wanted change name of table creted rake db:migrate financialss financials. created file in migrate directory called changeme.rb looks this.
class createfinancials < activerecord::migration def self.up rename_table :financials, :financialss end def self.down rename_table :financialss, :financials end end
i tried run following:
rake db:migrate:up changeme.rb
and got following error:
rake aborted! don't know how build task 'db:migrate:changeme.rb'
all appreciated
use rails generator
rails g migration migrationname
the rails not understand when come out of convention. try use default generator.
Comments
Post a Comment