efcore icon indicating copy to clipboard operation
efcore copied to clipboard

In PM Command line input “Update-Database newbook” when My models are Modified but result is error

Open applenele opened this issue 10 years ago • 7 comments

In PM Command line input “Update-Database newbook” in order to modify db when My models are Modified but result is error and Chinese garbled。 611961-20160519002012529-789919599

applenele avatar May 20 '16 00:05 applenele

And If I remove the db ,it worked.i want modify the field only and retain the original data

applenele avatar May 20 '16 00:05 applenele

Are you using entity framework core?

gdoron avatar May 23 '16 05:05 gdoron

EF Team Triage: This issue is lacking enough information for us to be able to effectively triage it. For a guide on submitting good bug reports, read_ Painless Bug Tracking. The most important elements to help us act on a bug report are example code/steps that reproduce the issue, the outcome/results you are expecting, and the results or error message that you are receiving. Following are a few questions to help us understand this bug report, for future issues please try to include this info in the initial report.

Could you share a complete code listing (or a project) that we can use to reproduce and debug the issue you are seeing?

cc @roji

rowanmiller avatar May 23 '16 22:05 rowanmiller

I suppose he has used DbContext.Database.EnsureCreated(). Migration cannot be used in this scene.

yukozh avatar May 24 '16 00:05 yukozh

http://www.cnblogs.com/nele/p/5507244.html This is a article that records my problem in Chinese but Code is clear.You can have a look,Later I will provide a detailed Code. think you. @rowanmiller

applenele avatar May 24 '16 03:05 applenele

Yes,I am using entity framework core @gdoron

applenele avatar May 24 '16 03:05 applenele

I find a same issue __EFMigrationsHistory table not populated on database create ,i get it.

applenele avatar May 24 '16 05:05 applenele