Dockerfile
Dockerfile copied to clipboard
webdevops/liquibase:mysql insert error on date field
Hi, we have been using webdevops/liquibase docker image in our project for some time and suddenly we started seeing errors during integration tests where liquibase mysql insertion with date value is failing. Sample error message is shown below. There is no change in the liquibase source xml files so wondering if there was any recent update in the docker image that is causing issues. (we always pull latest image).
Mysql query below is correct except that date value has no quotes around it, that's why it is failing.
However, we are not sure what is causing the sudden removal of quotes in the date value. ??
Any response is highly appreciated.
Error message ============= Unexpected error running Liquibase: 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 '16:30:2, 1, 0, 'e1341f36-c8ff-410d-85a4-6fbf793df36b', '2d780621-7a99-44ff-b332-' at line 1 [Failed SQL: INSERT INTO xxx_schema.xxxMapping (id, version, publishedOn, hasBeenPublished, hasBeenRetired, variable_id, spatula_variable_id) VALUES ('71234568-eb4d-46e8-bc3e-803581e6de58', 0, 2016-10-03 16:30:2, 1, 0, 'e1341f36-c8ff-410d-85a4-6fbf793df36b', '2d780621-7a99-44ff-b332-f26d93d55215')]
Thanks, Sai
And here is insert script from the liquibase databasechangelog xml, if needed. Thanks!!
I'm not an expert in liquibase and I used it only once. Only thing that changed recently was an update from 3.5.3 to 3.6.3 https://github.com/webdevops/Dockerfile/commit/388f454914de585319ab885746f015ee7727a3a7