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

【bug】sqlite 默认值设置 AddColumn方法 默认值无效,DbMaintenance.CreateTable 创建表方法有效的 #1318

Open
luoxue2017 opened this issue Jan 9, 2025 · 2 comments

Comments

@luoxue2017
Copy link

SqliteCodeFirstEnableDefaultValue = true 后调用DbMaintenance.CreateTable方法会自动设置默认值,调用AddColumn方法不会自动创建默认值

@luoxue2017 luoxue2017 changed the title 【debug】sqlite 默认值设置 AddColumn方法 默认值无效,DbMaintenance.CreateTable 创建表方法有效的 【bug】sqlite 默认值设置 AddColumn方法 默认值无效,DbMaintenance.CreateTable 创建表方法有效的 Jan 9, 2025
@luoxue2017
Copy link
Author

补充说明 mysql和sqlserver在DbMaintenance.CreateTable建表时 Col的默认值也是无效的

@DotNetNext
Copy link
Owner

DotNetNext commented Jan 10, 2025

SQLITE只支持建表默认值
CreateTable是底层方法 (多库兼容看动态建类)
部分库需要DbMaintenance.addDefalutValue

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