0

couldn't create model from sql due to parsing issue, even script generated from vertabelo model is failing.

Aneesh K 4 years ago updated by Adam Mościcki 3 years ago 7
I am trying to create new model from SQL file , but its keep failing due to parsing issue. Even failing basic script or for script generated by Vertabelo from other model.

Answer

Answer

Hello,

To make it work, please comment out/remove lines at the end of the sql file like:

'ALTER TABLE xxx MODIFY yyy int(11) NOT NULL AUTO_INCREMENT;'

I have removed those lines from your sql and it worked.
Our sql2vertabelo tool has trouble in parsing such statetments.


Also I have shared to you a model which i got. Feel free to unshare me.

I've investigated the issue. All of the files you tried to import are in UTF-16 format. Our system accepts only UTF-8.
What's more, each of your files started with the same strange set of characters. Their hex representation is:
EF BF BD EF BF BD

Please import a valid UTF-8 file.
Thanks Michal, appreciate your response. Here is my observation,
Event it fails with UTF-8 format, only time it was succeeded was ANSI format :(. I would expect this tool to support input file at any format since not all the default file save option from any IDE( like visual studio, SQL Management Studio) will be as UTF-8 unless modified via Save As.
Well, that's strange. There are no reports from other users about problems with SQL import. I've tested it with files in UTF-8 encoding and works for me as well.
Can you please attach one or more files for which SQL import failed? The more the better, we need to reproduce the issue to be able to fix it. Thanks in advance.

I had the same issue, I opened my SQL code generated by SQL wizard and had to change the format to ANSI to make it work.

Hi, I have the same issue, I export a .sql file from phpmyadmin and put it to ANSI and it keeps telling me an error. HELP !!!!

Answer

Hello,

To make it work, please comment out/remove lines at the end of the sql file like:

'ALTER TABLE xxx MODIFY yyy int(11) NOT NULL AUTO_INCREMENT;'

I have removed those lines from your sql and it worked.
Our sql2vertabelo tool has trouble in parsing such statetments.


Also I have shared to you a model which i got. Feel free to unshare me.