我们从1个月开始使用Flyway而没有遇到任何问题.
但是,今天我尝试添加一个非常长(超过1500行)的新迁移脚本,并遇到奇怪的MySQL语法错误.
我在MySQL Workbench中打开了这个脚本,没有报告语法错误,脚本执行没有错误.
这个名为’V10012__insert-acceptance-testing-event-moment-passed.sql’的脚本包含以下说明.
INSERT statement 1
INSERT statement 2
…
INSERT statement LAST – 1
INSERT statement LAST
MySQL报告的错误如下:
[ERROR] Caused by
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 ‘INSERT INTO
video_feedback (id, youtube_video_id) VALUES ( 1102, /* id */’
at line 232 [ERROR]
com.googlecode.flyway.core.migration.MigrationException: Migration to
version 10012 failed! Please restore backups and roll back database
and code!
在“INSERT语句LAST”语句中报告错误.
但是如