Hi, I am getting an error when running a migration that is supposed to create tables called "bottom", "top", "left" and "right". Since "bottom" and "top" work just fine, my hunch is that in the SQL the "left" is mistaken for some join statement like "LEFT INNER JOIN". Couln''t one consider that a Rails bug? Shouldn''t Rails be able to escape names that match SQL keywords? Or is it in fact not possible to create tables named like that? And is there any way work around this? Ingo Weiss -- Posted via http://www.ruby-forum.com/.
> I am getting an error when running a migration that is supposed to > create tables called "bottom", "top", "left" and "right". Since "bottom" > and "top" work just fine, my hunch is that in the SQL the "left" is > mistaken for some join statement like "LEFT INNER JOIN".Do you already have a table called Left? It''s a MySQL reserved word (for v5 anyway) http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html -- Darren Beale http://bealers.com
Ingo Weiss
2006-May-05 06:20 UTC
[Rails] Re: Error when creating table "left" in migration
Hi Darren, no I did not have a "left" table yet. Sounds like it''s not an accepted table name, and I ended up calling it bounds_left instead Thanks! Ingo Darren Beale wrote:>> I am getting an error when running a migration that is supposed to >> create tables called "bottom", "top", "left" and "right". Since "bottom" >> and "top" work just fine, my hunch is that in the SQL the "left" is >> mistaken for some join statement like "LEFT INNER JOIN". > > Do you already have a table called Left? > > It''s a MySQL reserved word (for v5 anyway) > http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html > > -- > Darren Beale > http://bealers.com-- Posted via http://www.ruby-forum.com/.