I'm new to Entity Framework and using VS 2012 with SQL server 2008 R2 ,
Just want to know what the usage of __migrationhistory table the is created automatically in the database .
any web reference for this or any article would be a great help
Loading
Manish Kumar ChoudharyPosted Jan 8, 2015, 11:24 PM
Hi Sanjeewa Abeywardana,
The migrations history table is an Entity Framework system table used to store metadata describing the schema version history of one or more EF Code First models within a given database.
History table customization is a new feature allowing various aspects of the history table (such as table name, column facets etc.) to be configured. It is an advanced feature primarily intended to improve the Migrations experience with third-party providers (where the default history model configuration is not always ideal). Care needs to be taken when customizing the history model as it becomes possible to define a model that no longer properly supports the migrations runtime – EF does not currently check whether a customized history model is compatible with the runtime. Additionally, customization must happen before the first migration is applied and is not supported if the first migration is an auto-migration. Migrations will detect any changes to the history model subsequent to the initial code migration and throw an appropriate error.
Configuration is expressed in a way already familiar to Code First users: Deriving a "history" DbContext, overriding OnModelCreating and calling fluent APIs on the provided DbModelBuilder instance.
Go through following links it will help you
http://msdn.microsoft.com/en-us/data/dn456841.aspx
http://stackoverflow.com/questions/24317515/entity-framework-migration-from-existing-production-database-with-empty-migratio
http://elegantcode.com/2012/04/12/entity-framework-migrations-tips/
Sanjeewa AbeywardanaPosted Jan 9, 2015, 9:55 AM
Sanjeewa AbeywardanaPosted Jan 8, 2015, 2:09 PM
But the __MigrationHistory table only consist of
[MigrationId],[ContextKey],[Model],[ProductVersion] may be inside the EF architecture they is
a process of scheme handling
any good web reference to read about this ?
or else please give some more details and clues
Manish Kumar ChoudharyPosted Jan 8, 2015, 1:56 PM