info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

trigger on cvs update / How to handle changes in sql schema?


From: Janning Vygen
Subject: trigger on cvs update / How to handle changes in sql schema?
Date: Tue, 15 Jan 2002 17:11:53 +0100

Hi,

a web site and its SQL schema is managed with CVS and has multiple 
developers. Each developer has its own testserver. So he can 
checkout, test and commit changes. 
The production database can be mirrored to the testserver with a 
provided shell script. So you can use real data on your testserver.
so far so good.

if one developer wants to change the database schema, he changes the 
schema sql files in directory src/sql. He will also write a file 
update.sql which can be used to sync old databases with the new 
schema.

He tests it and it works so he does a 'cvs commit'.( but its not yet 
installed on production server)

Another user does 'cvs update' and keeps developing. Now he has new 
schema and new Files but still the old mirrored production database 
which doesnt fit. He could run update.sql manually.

I would like to have a trigger on a cvs update command on a certain 
file which calls a shell script which does the following:
- mirror production database
- run update.sql

Later you can run an install script to install new site and new sql 
schema on production server and database. This script should run 
update.sql on production server and calls echo -n > 'update.sql' to 
truncate the update file and should do a cvs commit on update.sql.

After installing every user can do a cvs update and it will cause the 
production database to be mirrored and it will run an empty 
update.sql against it. 

so i need a trigger on 'cvs update' 
OR
somebody helps me with a much finer solution for problems of that 
kind.

I read cvs doku but only found loginfo, commitinfo and so on.

regards 
janning

-- 
Planwerk 6 /websolutions
Herzogstra├če 86
40215 D├╝sseldorf

fon 0211-6015919
fax 0211-6015917
http://www.planwerk6.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]