Flyway警告:SQL状态:HY000 - 错误代码:1366

时间:2017-11-01 16:51:57

标签: hibernate spring-boot spring-data-jpa flyway

春季启动中的Flyway正在运行,虽然运行第一个版本的数据库,该数据库相当大并且包含许多插入语句,除了数据库架构,在控制台中记录以下内容

2017-11-01 17:04:16.096  INFO 1268 --- [  restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'flyway' of type [class org.flywaydb.core.Flyway] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-11-01 17:04:16.105  INFO 1268 --- [  restartedMain] o.f.core.internal.util.VersionPrinter    : Flyway 3.2.1 by Boxfuse
2017-11-01 17:04:16.367  INFO 1268 --- [  restartedMain] o.f.c.i.dbsupport.DbSupportFactory       : Database: jdbc:mysql://localhost/coop_erp (MySQL 5.5)
2017-11-01 17:04:16.397  INFO 1268 --- [  restartedMain] o.f.core.internal.command.DbValidate     : Validated 2 migrations (execution time 00:00.014s)
2017-11-01 17:04:16.463  INFO 1268 --- [  restartedMain] o.f.c.i.metadatatable.MetaDataTableImpl  : Creating Metadata table: `coop_erp`.`schema_version`
2017-11-01 17:04:19.678  INFO 1268 --- [  restartedMain] o.f.core.internal.command.DbMigrate      : Current version of schema `coop_erp`: << Empty Schema >>
2017-11-01 17:04:19.679  INFO 1268 --- [  restartedMain] o.f.core.internal.command.DbMigrate      : Migrating schema `coop_erp` to version 1.1 - Init
2017-11-01 17:05:03.707  WARN 1268 --- [  restartedMain] o.f.c.internal.dbsupport.JdbcTemplate    : DB: Incorrect string value: '\xA0Produ...' for column 'description' at row 5 (SQL State: HY000 - Error Code: 1366)
2017-11-01 17:05:03.708  WARN 1268 --- [  restartedMain] o.f.c.internal.dbsupport.JdbcTemplate    : DB: Incorrect string value: '\xA0Inven...' for column 'friendly_name' at row 78 (SQL State: HY000 - Error Code: 1366)

问题

如何消除警告:SQL State: HY000 - Error Code: 1366

是否意味着未插入导致错误的数据。

注意:已从MySQL Workbench中提取数据库架构和数据。

1 个答案:

答案 0 :(得分:1)

我自己找到了解决方案。由于某种原因,flyway不喜欢单词中的双重空格。删除双空格使数据库迁移顺利进行。  轻而易举。