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

DROP TABLE 后,就无法自动建表 #345

Closed
guliang21 opened this issue Jun 12, 2020 · 1 comment
Closed

DROP TABLE 后,就无法自动建表 #345

guliang21 opened this issue Jun 12, 2020 · 1 comment

Comments

@guliang21
Copy link

开启自动同步以后,直接执行 SQL 语句 DROP TABLE 删除表,然后插入数据,就不会自动建表,而是报 对象名 xx 无效。

@2881099
Copy link
Collaborator

2881099 commented Jun 12, 2020

是的,SyncStructure 有防止运行中重复迁移

ConcurrentDictionary<Type, ConcurrentDictionary<string, bool>> _dicSynced = new ConcurrentDictionary<Type, ConcurrentDictionary<string, bool>>();

两个办法的可以解决

  1. 新建临时 IFreeSql 执行,SyncStructure,用完释放 IfreeSql

  2. 反射控制内部变量,看上面文件 71 行那个字段,再使用 SyncStructure 迁移

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