View Ticket
Not logged in
Ticket Hash: 320effb28ce342e0e3ff9dbcf1099e938d640579
Title: SQLiteProviderManifest ignores precision on DateTime value
Status: Deferred Type: Feature_Request
Severity: Important Priority: Medium
Subsystem: LINQ Resolution: Under_Review
Last Modified: 2017-10-16 03:02:32
Version Found In:
User Comments:
anonymous added on 2017-07-15 01:02:38:
When attempting to try and figure out why my migrations were trying to always alter my DateTime column, I investigated, and I believe the problem lies with getting the EdmType of a field. The SQLiteProviderManifest seems to ignore the HasPrecision property on the fluent API:

        .Property(t => t.DateTime)

What results is the database attempting to use the default value (Which appears to be 3 to support miliseconds), but upon checking to ensure the database has created the column successfully, the database returns a precison of 0 (As SQLite doesn't appear to support precision on datetime fields). This results in my DBMigrationHelper attempting to ALTER the column to add precision every time.

The fix: Either manually set the precision to 0 instead of EntityFrameworks default of 3, or read the "HasPrecison" property, and return the correct EdmType.

mistachkin added on 2017-07-15 18:28:03:
It appears that this has never been supported.  Changing to feature request.