Flyway 警告:SQL 状态:HY000 - 错误代码:1366
Flyway Warns: SQL State: HY000 - Error Code: 1366
spring 引导中的 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.
中提取
我设法自己找到了解决方案。出于某种原因,flyway 不喜欢 words.Removing 双空格中的双空格,这使得数据库迁移顺利进行。
一个breeze.
spring 引导中的 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.
中提取我设法自己找到了解决方案。出于某种原因,flyway 不喜欢 words.Removing 双空格中的双空格,这使得数据库迁移顺利进行。 一个breeze.