How to keep track of changes between coding and live enviroment for a web application [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this questionI've been coding a web application for a while now without changing anything on the live server as there are some features to be added at once. I figure out that I had no way to keep track of what have changed since the last time I've updated the live server and that made me panic a bit because forgetting to upload a file or don't make a change in a particular file would break the application. So my question is what is the best practice to keep track of what have been changed on the coding environment and what been already on the live server so to make the changes without users noticing?
Use some repository system and release pattern in production. The way I do is:
- Whenever I want to deploy on Production,I create a Tag of the application. Give it a release version.
- I bump the current version in Trunk, where newer features will be developed.
- In case, prod version needed to be something done before the next release, I create a branch. This branch originates at the previous release. Then we do a patch release. Create a tag for it.
- We merge the branch to trunk.
We follow this cycle release to release.
Please read version control. This might help http://svnbook.red-bean.com/en/1.5/index.html
On Database#
We used to have database changes in alter-script files. One alter-script file per release. All the changes that need to go to the release, we keep in one alter-script. We used to have a BASELINE table that tracks the release version of database, which is same as production release version. This works, but there was manual intervention. But any given time looking into BASELINE table, I can what is the status of my database and what files/alterscript have ran already.
We have now moved to LiquiBase, and this is excellent. I can keep track of each query, update or alter that have ever ran into the database. There is a fine rollback plan. Above all, learning Liquibase is quite easy.
In either case above, SVN handles revisions quite efficiently for us.
精彩评论