Hello,
I am attempting to learn Ruby on Rails. I'm using Instant Rails
2.0 on a Windows computer. I really want the id number to
autoincrement, but I am not sure how to do that. The script that’s
generated after the scaffold is listed below. Any help is appreciated.
class CreateMenuitems < ActiveRecord::Migration
def self.up
create_table :menuitems do |t|
t.integer :id
t.string :category
t.text :categoryinfo
t.string :name
t.string :price
t.text :iteminfo
t.timestamps
end
end
insert into menuitems values(NULL);
def self.down
drop_table :menuitems
end
end