Error “column c.CreatedOn does not exist…” in PostgreSQL logs during code first context initialization using the Devart dotConnect provider

StackOverflow https://stackoverflow.com//questions/24025248

Question

I'm getting the following error in my PostgresSQL logs whenever my context is initialized:

2014-06-03 09:51:25 PDT ERROR:  column c.CreatedOn does not exist at character 10
2014-06-03 09:51:25 PDT STATEMENT:  SELECT 

    c."CreatedOn"

    FROM "__MigrationHistory" AS c

    LIMIT 1 

Everything seems to work okay for the most part, but I'd like to better understand the error and make it go away if possible.

Is this an error with the dotConnect provider or am I expected to add this custom column to my __MigrationHistory table?

Was it helpful?

Solution

The "column c.CreatedOn does not exist" exception is expected for this scenario. This is the internal logic of Entity Framework.

The CreatedOn column is used only in EF 4.3 and below. However, the internal check for the table "__MigrationHistory" and, accordingly, for the "CreatedOn" column still exists and, consequently, in the later EF versions this gives an error. However, the implementation of this request does not stop the application and does not affect the result.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top