I originally posted this on stack overflow but was told that here is a better place to ask this kinda stuff. I couldn't find any other similar answered question but if there is one please give me a link.

I am developing a software which uses a database that is hosted on a main server(MSSQL). Multiple clients can be connected to the same server at any given time. I am using Entity Framework with the Code-First approach.

My concern is how the database is going to be deployed and later updated. Since we are talking about a centralized database, automatic database migration being performed by any of the clients is out of the question in my opinion. I have been thinking of using a separate server configuration app that is going to connect to the server(database) and perform database creation(first time only) and migration when needed.

Also the reason why I think automatic database migration cannot work in my case is because whenever a client is run, it will check if it there is a migration available for the database and if there is, it is going to apply it. That, though, might result in problems for other clients which haven't been updated yet. That is why I think there should be a configuration app that updates the database independently of any of the clients.

Do you think this is a good way to solve the problem or is there a better one?

  • You are assuming that the new software S2 can work with the old database D1 and that the old software S1 is incompatible with the new database D2. Both are assumptions might not be true.
    – Patrick
    Commented Nov 4, 2014 at 10:33
  • By "other clients which haven't been updated yet", I mean older versions of my software(aka not latest version), which may still be connecting to the database. There is no old software or database. The update process for a network (multiple clients+single server), according to the solution I am thinking about is supposed to be something like this: 1. Update database. 2. Update every client to latest version of the software while displaying errors to clients trying to connect with old versions. I hope this clears it up a bit.
    – Phoenix
    Commented Nov 4, 2014 at 12:42

1 Answer 1


Hey I know it has been a while since I posted this, but I noticed there are people still interested in the answer so I thought I should update with what I chose to go with.

I decided to use a self-hosted WCF service that clients connect to and get their data from. The service is responsible for database creation and migration and also notifies clients if they need to update in order to be able to connect.

I think this is the best solution for my case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.