Page 1 of 1

Why do I get "no such table: EdmMetadata" using Code First migration

Posted: Sat 08 Jul 2017 20:31
by kiwiSteve
I'm using dotConnect for SQLite Pro (5.9.931) and Code First migration in EF 6.1.3 to create/update my SQLite database. However I'm getting a 'no such table: EdmMetadata' error:

Code: Select all

Devart.Data.SQLite.SQLiteException occurred
  HResult=0x00000001
  Message=SQLite error
no such table: EdmMetadata
  Source=Devart.Data.SQLite
  StackTrace:
   at Devart.Data.SQLite.a8.a(Byte[] A_0, UInt32 A_1, Byte[]& A_2)
I've read that the EdmMetadata class and the IncludeMetadataConvention have been obsoleted since EF 4.3, so why do I get this error? Is there a way to avoid it?

Re: Why do I get "no such table: EdmMetadata" using Code First migration

Posted: Thu 13 Jul 2017 16:58
by Shalex
Talking to "EdmMetadata" is a designed behavior. Entity Framework v 4.1 and 4.2 used this table instead of "__MigrationHistory". Entity Framework engine checks the availability of an outdated "EdmMetadata": if it exists, the database schema will be processed in a different way. So the "no such table: EdmMetadata" error is catched, and program execution continues successfully. This is OK.