Workflow: SVN repository, check out and content

168 views Asked by At

We have a workflow challenge regarding content and code synchronization. Our problem is that we do not exactly know what the best approach is, to manage the content of a website and the code development of it.

We have the following situation:

  1. Developer 1 does a code check out. Develops some back-end code BUT does also make changes to (HIS LOCAL) database. The changes are on the database structure and database content.
  2. Developer 2 adds some content of the website to (HIS LOCAL) database (such as news items or other content). He also modifies some front-end code. No changes to the database structure.
  3. Developer 3 adds some front-end code. No changes to the database.
  4. Content Editor adds some content to (HIS LOCAL) database. No changes to the database structure.

This is happening all simultaneously. There is not really a freeze moment.

What is the best approach to manage this workflow? How can we optimally use SVN and is a central database advisable?

1

There are 1 answers

0
Tel Janin On

Personal opinion here.

You need to keep two sets of files describing your database schema.

The first is a sql file / script that creates the database from scratch to current spec.

The second is a series of SQL files or scripts that do incremental changes.

Every time there is a structural change to the database, the developer updates/regenerates the master schema and writes a script/incremental file that checks to see if the changes has been applied (tests for existence of a new column or table) and if not, performs the necessary operations to bring the schema up-to-date. This should only apply the changes that the developer made.

Then, as your other developers check out and perform local installations, the installation step should execute ALL the incremental update steps if upgrading, in order. This means that you should be able to safely apply the successive updates which may build off each other. If doing a clean installation, you simply generate the database from the complete file.