entity framework - EF Code First Migration Files Source Control -
wanted ask bluntly can't seem find answer out there.
when run 'add-migration...' 3 new file migration files created (.cs, .resx, .designer.cs). in regards source control, files should commit repo , files can ignore? i'm interested in files absolutely necessary reconstruct tables if needed.
when run 'add-migration...' 3 new file migration files created (.cs, .resx, .designer.cs). in regards source control, files should commit repo , files can ignore?
all 3 files necessary reconstruct database.
- the
.cs
file containsup
,down
method you, respectively, updgrade or downgrade database. - the
.resx
file contains metadata used migrations. contains name of default schema use (dbo default value) , snapshot of model @ time migration generated. - the
.designer.cs
here because of presence of.resx
. contains properties make easy access settings on.resx
file.
all 3 files need committed , pushed in source control , no 1 should edit them.
Comments
Post a Comment