Reputation: 35
I have a existing database, and I am using the database-first approach in Entity Framework 6. Now, I have to update my database table with a new table. I know that we can maintain migration if we use code-first approach.
Is there any way we can maintain migrations using db first approach ?
Upvotes: 0
Views: 384
Reputation: 11891
Create a database project in VS, import your existing database, add your new tables, generate a DACPAC, then you just install the DACPAC at deployment time, and it will automatically migrate your database. –
Alternately, you will have to start creating and maintaining update scripts that add the new fields and tables etc and run them at deployment time
Upvotes: 1