Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force a new seed without any migration

For a changeset I need to populate a table with some seed values.

But... I have no new migration in this changeset. The seed is normally invoked after the last migration has been done.

How can I force the build to seed after deploy ?

(using VS2013, TFS 2012 SP1, EF 5.0, MVC)

like image 893
Patrick Peters Avatar asked Dec 02 '25 12:12

Patrick Peters


1 Answers

You don't need a migration. The Migrations Seed method runs anytime Update-Database is used.

Update-Database -ConnectionString "Data Source=etc"

like image 58
Colin Avatar answered Dec 05 '25 00:12

Colin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!