Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL error when migrating in production #34

Open
sylario opened this issue Sep 16, 2011 · 1 comment
Open

SQL error when migrating in production #34

sylario opened this issue Sep 16, 2011 · 1 comment

Comments

@sylario
Copy link

sylario commented Sep 16, 2011

I am using rails 3.0.3 with MySQL Ver 14.14 Distrib 5.1.41

At migration i have the following error :
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 '' at line 1: ALTER TABLE carts ADD status enum

How can i solve it?

@jeffp
Copy link
Owner

jeffp commented Sep 16, 2011

Hi

Instead of using t.enum in your migration, try using t.string to declare the
enumerated attribute db field.

Cheers,
J

On Fri, Sep 16, 2011 at 3:35 AM, sylario <
[email protected]>wrote:

I am using rails 3.0.3 with MySQL Ver 14.14 Distrib 5.1.41

At migration i have the following error :
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 ''
at line 1: ALTER TABLE carts ADD status enum

How can i solve it?

Reply to this email directly or view it on GitHub:
#34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants