|Title:||SQLiteProviderManifest ignores precision on DateTime value|
|Last Modified:||2017-10-16 03:02:32|
|Version Found In:||188.8.131.52|
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: modelBuilder .Entity<Transaction>() .Property(t => t.DateTime) .HasPrecision(0); 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.