VERS='6.06.008'

echo "Mise a jour de la base de donnees pour Version $VERS"

isql - - <<EOT

DATABASE gc;

UPDATE
gc_parsys
SET
version= '$VERS'
WHERE
version<'$VERS';

ALTER TABLE gc_parsys ADD (
    txda6 float,
    txda7 float,
    txda8 float,
    txda9 float,
    txda10 float,
    txda11 float,
    txda12 float,
    txda13 float,
    txda14 float,
    txda15 float,
    txda16 float
);

UPDATE gc_parsys SET
    txda6 =0,
    txda7 =0,
    txda8 =0,
    txda9 =0,
    txda10 =0,
    txda11 =0,
    txda12 =0,
    txda13 =0,
    txda14 =0,
    txda15 =0,
    txda16 =0
WHERE txda6 IS NULL;

ALTER TABLE gc_ctax ADD (
    txda6 float,
    txda7 float,
    txda8 float,
    txda9 float,
    txda10 float,
    txda11 float,
    txda12 float,
    txda13 float,
    txda14 float,
    txda15 float,
    txda16 float
);

UPDATE gc_ctax SET
    txda6 =0,
    txda7 =0,
    txda8 =0,
    txda9 =0,
    txda10 =0,
    txda11 =0,
    txda12 =0,
    txda13 =0,
    txda14 =0,
    txda15 =0,
    txda16 =0
WHERE txda6 IS NULL;

EOT

chmod 666 $DBPATH/gc.dbs/*.idx
chmod 666 $DBPATH/gc.dbs/*.dat

echo "Mise a jour terminee"

