# Upgrade issue

**URL:** <https://www.ruby-forum.com/t/upgrade-issue/109349>\
**Category:** Rails\
**Created:** [July 13, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/upgrade-issue/109349 "2007-07-13T17:15:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/dc4da7/32.png) [@newbie](https://www.ruby-forum.com/u/newbie)\
**Post date:** [July 13, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/upgrade-issue/109349/1 "2007-07-13T17:15:51Z")

</div>

I upgraded from rails 1.1.6 to 1.2.3 and suddenly the db migration  
stopped working…

I had the following in my migration script.

```
create_table :data_feeds do |t|
  # t.column :name, :string
  t.column :id, :integer
  t.column :date, :date
  t.column :domain, :string
  #...... (some lines cut here)
end

```

So Rails generated the following code, which stopped working in my  
MySQL 5 after the migration.

CREATE TABLE data\_feeds  
(`id` int(11) DEFAULT NULL auto\_increment PRIMARY KEY(11),  
`date` date DEFAULT NULL,  
`domain` varchar(255) DEFAULT NULL) ENGINE=InnoDB;

The error message was:

ERROR 1064 (42000): 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),

`date` date DEFAULT NULL,  
`domain` varchar(255) DEFAULT NULL) ENGINE=Inn’ at line 2

So I deleted the suspicious “(11)” at the end of the 2nd line and  
everything works.  
Now the question is, the sql statement are auto-generated by rails. So  
how can I tell Rails not to put the “(11)” at the end, or is there a  
configuiration issue?

Thanks!

---

<div class="post-metadata">

**Author:** ![newbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/dc4da7/32.png) [@newbie](https://www.ruby-forum.com/u/newbie)\
**Post date:** [July 13, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/upgrade-issue/109349/2 "2007-07-13T18:27:03Z")

</div>

Well… you have

```
 t.column :id, :integer

```

in your migration. You don’t have to declare the :id column in a  
migration… you’ve never had to as it’s automatically assumed. I wonder  
if  
that’s causing your issue.

Hope that helps!

-Brian H.
