Reputation:
I have a WPF application that I have published a year ago and had been using it(and MSSQL database .mdf-extension) that I filled by the past year with some data.
Now I have made some changes in the code behind (filename.cs) in my application so when I publish I get a fresh new database. And I want to use the already filled database.
How do I accomplish that(This comes like an upgrade/update to my WPF app)?
Upvotes: 1
Views: 122
Reputation:
You need an SQL Schema Compare tool to compare your old SQL Schema and new SQL Schema. There are various tools, in fact Visual Studio even has one.
But for complex scenarios you may have free alternatives
All you need is to define schema changes between your databases, and edit the generated diff SQL in order to preserve the data.
Upvotes: 1