Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alter table xxx add constrain XXX unique 为什么不可以?导致hibernate hbm2ddl 启动创建表时无法成功添加unique constraint #978

Open
ghost opened this issue Oct 21, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 21, 2015

我看MySqlStatementParser里没有考虑这种情况。这导致hibernate hbm2ddl 启动创建表时无法成功添加unique constraint。

@yakolee
Copy link
Contributor

yakolee commented Oct 23, 2015

你使用的是哪个版本,我这里使用最新版本1.0.16测试mysql是支持alter table xxx add constrain XXX unique解析的

@ghost
Copy link
Author

ghost commented Oct 23, 2015

我也是1.0.16,确实报错啊。(使用了wall Filter)
看下MySqlStatementParser的parseAlter方法,只考虑了PRIMARY和FOREIGN两种情况,UNIQUE就走2341行抛异常了。

@429668385
Copy link

使用DruidDataSource不配置就可以跑起来了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants