Comments (2)
A non-nullable int
in the DBMS must have a default value. If no default is specified, the default value is 0.
If you don't want a default value, you should define your property using the nullable int?
type.
from pomelo.entityframeworkcore.mysql.
In that case in my opinion there is an inconsistence. For example when the table is created the first time using non-nullable values the fields appears on the database with no default values. However if you add a migration with a new value (non-nullable) type, that field will be the only type with a default value. I think you must make this process homogenous at least. Or all value types gets the default value, even when creating the database or you remove the default values on migrations. I haven't taken a look to the behavior on SQL Server but in case of doubt you should follow that.
from pomelo.entityframeworkcore.mysql.
Related Issues (20)
- Using `SELECT ... ORDER BY (SELECT 1)` can lead to the return of unexpected data using Oracle MySQL releases HOT 4
- Method Not Found - Metadata.IMutableEntityType.GetProperties() HOT 3
- Non-deterministic connection interruptions after upgrading from 6.0 to 8.0 HOT 11
- how to read DateTimeOffset in specific timezone? HOT 7
- ServerVersion.AutoDetect(connectionString) fails HOT 8
- in 8.0.1 Is Timestamp byte[] no longer supported? HOT 11
- Implement support for Oracle MySQL's `CAST(... AT TIME ZONE ...)`
- Change return type of all `EF.Functions.DateDiff` extension methods related to units of `SECOND` or smaller from `int` to `long` HOT 4
- Just a quick question: does it support JSON data type? HOT 1
- Re-Opening connection hangs after successful query within scope of Http Request HOT 4
- Database generated value for DateTime givs an error after updating to version 8.0.1 HOT 5
- `Math.Log` number and base are in the wrong order in mysql `LOG` function HOT 1
- SEVERE ASP Api Response Time Problems with 8.0.1 and beyond HOT 10
- why string contains can be translated to like '' HOT 2
- Replace JSON_EXTRACT utilisation with JSON_VALUE HOT 5
- All primary keys altered in migration after upgrading efcore to 8.0.1 HOT 3
- Getting different SQL output for the same LINQ Query since upgrading to .NET 8 HOT 2
- ArgumentException: Option 'name' not supported. HOT 11
- Input string was not in a correct format when compare with TimeSpan HOT 1
- After upgrading from 7.0.0 to 8.0.2, SQL translation results are changed and this version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pomelo.entityframeworkcore.mysql.