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

🐞自动迁移修改分片表表名 #210

Open
xuejmnet opened this issue Oct 24, 2022 · 2 comments
Open

🐞自动迁移修改分片表表名 #210

xuejmnet opened this issue Oct 24, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@xuejmnet
Copy link
Collaborator

xuejmnet commented Oct 24, 2022

问题

  • 对象是分表对象,修改了表名的Migrations迁移报错

虽然不是一个常见的需求,如果你有分片对象且分片对象有表名修改的迁移记得不能自动迁移,因为会报错不存在分片表名修改前的表drop出错的bug,因为ShardingCore没有持久化功能所以没办法记录修改前的表名,当然如果你是普通对象或者,仅分库对象那么是没关系的,当然如果你有好的解决方案希望可以提出来一起讨论

@xuejmnet xuejmnet added the bug Something isn't working label Oct 24, 2022
@xuejmnet xuejmnet pinned this issue Oct 24, 2022
@xuejmnet xuejmnet changed the title 自动迁移修改分片表表名 🐞自动迁移修改分片表表名 Oct 24, 2022
@xuejmnet
Copy link
Collaborator Author

一定要自动迁移就创建一张之前的表只要表存在就不会报错

@xuejmnet
Copy link
Collaborator Author

或者通过脚本来执行,脚本里面自行修改

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant