mysql - Springboot hibarnate 错误:通过 JDBC 语句执行 DDL 时出错,数据库名称有条形符号
问题描述
如题,我的springboot版本是2.1.4,</p>
数据库名称 eg:my-db
它在从 1.5V 升级之前可用
现在我在模型中添加一列,然后程序启动时会抛出这个错误......</p>
application.yaml set:ddl-auto: update
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL ”alert table my-db.test add column name varchar(25)“ via JDBC Statement
解决方案
警报表 my-db.test 添加列名 varchar(25);
不知道你从哪里得到这个查询。此查询的正确语法是:
更改表 my-db.test 添加列名 varchar(25);
推荐阅读
- javascript - react native - 如何从 sqlite 表中获取“狗”列表?
- node.js - 从nodejs中的其他模型sequelize中检索数据
- node.js - nginx没有设置远程客户端ip地址
- html - 页脚与内容重叠
- java - 获取Android Fragment找不到ID的视图
- arrays - 在雪花卡夫卡连接器中,我们可以定义文件类型吗
- r - 在 R 中处理同一文件中的不同数字格式
- flutter - 如何在颤动中播放上一个屏幕的音频?
- javascript - 为什么当我单击相应元素时该功能不起作用?
- json - 为什么正则表达式模式会导致 jsonschema 中出现“错误字符串”错误?