Hope this is not as trivial
When generating my sql script out of the schema for the mysql database I
get something like
CREATE TABLE question_option
(
id_question_option MEDIUMINT NOT NULL AUTO_INCREMENT,
id_question MEDIUMINT NOT NULL,
option VARCHAR(255) NOT NULL,
PRIMARY KEY(id_question_option),
FOREIGN KEY (id_question) REFERENCES question (id_question)
) ENGINE InnoDB;
A part the InnoDB clause that I've added to table.vm file, the problem
here is the "option" column. "option" seems to be a reserved keyword in
mysql so running the script fails. I'm having such an issue because
we've developed against postgresql, which works fine, and I currently
need to install my app onto an existing mysql
The solution is really simple, prepending and appending two "`" so that
it comes something like
CREATE TABLE question_option
(
id_question_option MEDIUMINT NOT NULL AUTO_INCREMENT,
id_question MEDIUMINT NOT NULL,
`option` VARCHAR(255) NOT NULL,
PRIMARY KEY(id_question_option),
FOREIGN KEY (id_question) REFERENCES question (id_question)
) ENGINE InnoDB;
Is there an option to enable such "`" for column names or something like
that?
Thank you in advance
Federico
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]