Propel 和 build.properties 文件
每当我在干净的数据库(未定义表)上运行 propel-gen 时,它都会生成错误,因为它在创建表之前首先尝试删除表(当前不存在)。
我可以更改任何属性来解决此问题吗?
到目前为止我发现了这个: http://www.propelorm.org/ticket/732
但做点什么就好了就像“如果名称存在则删除表”
Whenever I run propel-gen on a clean database (no tables defined), it generates errors because it first tries to DROP a table (Which doesnt currently exist) before creating it.
Is there any properties I can change to fix this?
So far I've found this:
http://www.propelorm.org/ticket/732
But it would be nice to do something like "DROP TABLE IF EXISTS name"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
几个月前我遇到了同样的问题,但除了 trac 票之外找不到更多的东西(你也会发现我已经评论过它了:-))。
如果您发现这个错误非常烦人,也许可以尝试应用 Elan Ruusamäe 的补丁...
如果我有足够的时间/动力,我也可能会编写一个补丁(以使 Propel 发出
CREATE TABLE IF NOT EXISTS
for DBMS 支持它),希望修复将安排在下一版本之一。I faced the same problem some months ago but couldn't find more than the trac ticket (you will find, as well, that I have commented it :-)).
Maybe try to apply Elan Ruusamäe's patch if you find this bug very annoying...
If I have enough time/motivation, I may write a patch too (to make Propel issue a
CREATE TABLE IF NOT EXISTS
for DBMS supporting it) and hopefully the fix will be scheduled for one of the next versions.