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
Post a Comment