Create new database table ruby on rails schema.rb -


on ruby on rails app added following code in schema.rb file create new table in database

create_table "label_info", :force => true |t|     t.text     "body"     t.string   "title"     t.integer  "label_id"   end 

and run rake db:migrate command nothing happening. thought create new table in database .

if read first line of schema.rb file see:

# file auto-generated current state of database. instead # of editing file, please use migrations feature of active record # incrementally modify database, , regenerate schema definition. 

i recommand rails g model label_info


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -