You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our database model is quite large which results in a model snapshot of 1.5MB. Everytime someone adds another migration, this gets duplicated into the MyMigration.Designer.cs file inside the BuildTargetModel method. Not only does this add megabytes to git, it also significantly impacts compile times, IDE performance and deployment size (the 1.5MB increase in source file result in about 500kb increase in assembly size). This has lead to rationing of migrations and frequent migration squashing which is quite a time sink.
As far as i can tell, the designer file is only really needed to perform Remove-Migration. As we are using version control, and so should every respectable software shop, it would be nice to have at least an opt-in to disable generating that Designer file.
For some numbers:
The migration snapshot is 39792 lines long.
We have currently 46 migrations, totalling 72.7MB in the migrations folder, that were created since the last migration squash 4 months ago.
The database.dll (only DbContext + DbModels + Migrations) without migrations (but with model snapshot) takes 7s to build and results in an 3.493kb assembly. With the 46 migrations, build time is 34s and assembly size grows to 26.162kb.
The text was updated successfully, but these errors were encountered:
Our database model is quite large which results in a model snapshot of 1.5MB. Everytime someone adds another migration, this gets duplicated into the MyMigration.Designer.cs file inside the
BuildTargetModel
method. Not only does this add megabytes to git, it also significantly impacts compile times, IDE performance and deployment size (the 1.5MB increase in source file result in about 500kb increase in assembly size). This has lead to rationing of migrations and frequent migration squashing which is quite a time sink.As far as i can tell, the designer file is only really needed to perform
Remove-Migration
. As we are using version control, and so should every respectable software shop, it would be nice to have at least an opt-in to disable generating that Designer file.For some numbers:
The migration snapshot is 39792 lines long.
We have currently 46 migrations, totalling 72.7MB in the migrations folder, that were created since the last migration squash 4 months ago.
The database.dll (only DbContext + DbModels + Migrations) without migrations (but with model snapshot) takes 7s to build and results in an 3.493kb assembly. With the 46 migrations, build time is 34s and assembly size grows to 26.162kb.
The text was updated successfully, but these errors were encountered: