DVCS, Databases, and User Generated Content?

2019-07-09 07:40发布

I want to create a development environment with my central repository hosted somewhere like bitbucket/github. Then on my dev server and my production server I will have clones.

I will work on new features and make local commits on the dev server. Once this is at a stage that it can be pushed to production, I will push from the development clone to the central repository, then pull from the central repo to the production server.

All this makes sense, but there are 2 parts I cannot figure out.

How to keep the data-base and user-generated content (file uploads, etc.) in sync?

Also, will user generated content get wiped out when I do my next pull+update on the production server?

How do others address this?

Additional info: This is going to be a MySQL/PHP website. I am also planing on using a mvc framework (probably cake) and I haven't firmly decided which DVCS to use but so far Mercurial is what I am thinking. Not sure if this info matters but adding just in case.

1条回答
Explosion°爆炸
2楼-- · 2019-07-09 08:13

That is why a DVCS is not always the right tool for release management: once your code is on the server remote repo, you should have another "rsync" mechanism to:

  • extract the right tag (the one to put into prod)
  • transform/copy the right files
  • leave intact other set of files/database.
查看更多
登录 后发表回答