dimanche 12 juin 2016

Migration issue in rails

I am willing to create a new model i.e a new table for my application. I have already a table existing for my application and I want to create a new one. But I am facing problem when running rake db:migrate command after executing the following command for creating a new table.

rails g information age:string name:string

while running rake db:migrate command the system is showing the following error message:

don't know how to build task db:migrate

And no table is created ultimately. I am using Postgresql .

A migration is generated as :

class CreateInformation < ActiveRecord::Migration
 def change
  create_table :information do |t|
   t.string :age
   t.string :name

   t.timestamps null: false
  end
 end
end

And no change in the schema.rb file .

Aucun commentaire:

Enregistrer un commentaire