开发者

how to deploy new web application to old application with old database

I'm developing a new version for my web application with some redesigned databas开发者_如何学运维e structure. However, the old application is still working onine with customers. Is there any solutions for easing this deployment?

Thanks and best regards.

Edited: My question is about how to merge the old database with the new database with new redesigned structure. The old database had many new records when I developed new application with new database.


Just make a new database, and include the version in the name for example. You can have multiple databases on the same server, and even use multiple databases in the same application.


I believe there are two choices;

Either force all users to the new system with a bit of downtime, which as long as your site has some quite time on traffic you can schedule it then.

Alternatively upload both and run concurrently pointing everyone at the new site and give a time-frame to your users for taking down the old site.


These are some steps you can follow.

  1. First you have to get a backup database dump from the your existing database. Eventhough you made some mistake you are in the safe side.
  2. Then you can create a new database using the old dump.
  3. Then you have to figure out what are the changes you did in the structure.
  4. Then you have to map old data to the new tables which are changed using ALTER TABLE commands. For this you can first create necessary new tables using sql commands and then read the old data and insert in to new ones.
  5. If you are using mysql you can use "Transactions" to make sure your changes are persistent. You can refer my blog post to learn more on "Transactions" http://coders-view.blogspot.com/2012/03/how-to-use-mysql-transactions-with-php.html
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜