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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -