I'm a newcomer into the .net world, right now I'm working on Entity Framework code first approach.
I used migrations on single database, which worked fine,.but, what I should I do if I want to make database cloning of my default database, and if I added some column in my default database it should automatically added into other databases also, I searched everywhere but I didn't find what I was expected. Please Help me..
yash chandrachudPosted Nov 27, 2014, 11:12 PM
Wim SturkenboomPosted Nov 27, 2014, 4:14 AM
If that is the case, you don't want to do what you want. One mistake (e.g. drop the wrong column) and you have a problem.
What I would do is to use sql scripts for each and every change; that way you can test the script if it works and later you can apply it to the production server.
Note: pay attention to (new) non-nullable columns; there will be no data, so applying the change on the production server will cause issues. Give the column a default value (empty string, date in the year 1900, 0 for int types).