entity framework - EF Migrations - straight to final schema -


my schema has evolved on many iterations. have set of migrations taking schema empty db 1 dozens of tables , scores of columns.

along way there have been several additions of tables, columns , constraints, followed (in light of experience or new knowledge or changes in spec) removal or alterations. table or column name has been re-used or re-purposed.

now, ef migrations seems able run through sequence creating, altering, dropping, creating again, altering, etc., latest schema, feels wrong. in extreme case there might dozens of migrations creating tables followed dozens more dropping tables until final schema might 1 or 2 tables (unlikely, know). option go scratch final tables feel right.

in ruby days activerecord migrations there option build final schema, without stepping through , possibly undoing or redoing work along way. of course meant keeping complete ddl version of schema date after each migration, somehow felt more elegant.

has done similar entity framework?

you might try deleting __migrationhistory table database, removing migrations folder (backing configuration.cs file), , enabling migrations again.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -