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

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
kiwiSteve
Posts: 5
Joined: Sat 10 Jun 2017 23:30

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

Post by kiwiSteve » Sat 08 Jul 2017 20:31

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?

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

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

Post by Shalex » Thu 13 Jul 2017 16:58

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.

Post Reply