Mysql::Error: #42000You 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), `suite_id` int(11) DEFAULT NULL, `text` varchar(128) DEFAULT NULL) ENGINE=' at line 1: CREATE TABLE surefire_notes (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY(11), `suite_id` int(11) DEFAULT NULL, `text` varchar(128) DEFAULT NULL) ENGINE=InnoDBThe problem has to do with the 'PRIMARY KEY(11)'. I pasted the above command directly into mysql and removed the '(11)' and everything worked just fine. With some more googling I came across this site which further confirmed my discovery.
Tuesday, April 24, 2007
Migration gotcha
Apparently sqlite3 is more forgiving than mysql when it comes to migrations. I found out today that there is no need to specify the ':id' column and if you try it with mysql5 you will get an error similar to:
Subscribe to:
Post Comments (Atom)
About Me
Tags
- activerecord (1)
- camping (1)
- closures (1)
- cygwin (1)
- denver (1)
- drb (1)
- dsl (1)
- erlang (1)
- erlounge (1)
- fedora (8)
- freedom (1)
- FUDcon (1)
- GEB (3)
- git (1)
- gnu (1)
- gstreamer (1)
- hotmail (1)
- hpricot (1)
- java (1)
- jruby (1)
- kernel (1)
- kino (3)
- laptop (1)
- linux (3)
- machanize (1)
- meta programming (3)
- metaprogramming (1)
- mutt (2)
- open source (3)
- oss (1)
- pitivi (2)
- raleigh.rb (1)
- ruby (13)
- ruby curb hpricot (1)
- rubyconf (1)
- slashdot (1)
- svn (1)
- tux (1)
- ubuntu (1)
- unix (1)
- vim (1)
- vnc (1)
- windows (3)
No comments:
Post a Comment