Beginner mysql problem involving Rake

Hello, I'm new to rails and I'm trying to get a tutorial application off the ground

when running rake migrate it errors with a mysql syntax error response:

Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(11), `name` varchar(255) DEFAULT NULL, `address` varchar(255) DEFAULT NULL, `ci' at line 1: CREATE TABLE people (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY(11), `name` varchar(255) DEFAULT NULL, `address` varchar(255) DEFAULT NULL, `city` varchar(255) DEFAULT NULL, `state` varchar(255) DEFAULT NULL, `zipcode` varchar(255) DEFAULT NULL) ENGINE=InnoDB

My db file is as follows:

class ContactDb < ActiveRecord::Migration   def self.up           create_table "people" do |t|                   t.column "id", :integer                   t.column "name", :string                   t.column "address", :string                   t.column "city", :string                   t.column "state", :string                   t.column "zipcode", :string           end   end

  def self.down           drop_table :people   end end

I'm using a default mysql, apache, ruby, rails etc. install.

I noticed that It set the value of PRIMAY KEY to 11 and thought that was kind of strange. Anybody got any suggestions to get rake working right?

Thanks, Donald

Hi,

Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(11), `name` varchar(255) DEFAULT NULL, `address`

...

class ContactDb < ActiveRecord::Migration   def self.up           create_table "people" do |t|                   t.column "id", :integer                   t.column "name", :string

You must not create the id column in the migration. This is done automatically. I guess that the SQL syntax error consists in two columns named id.

Lutz