VERS='5.69.28'

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_soc
ADD
(
  bddflags7	INTEGER,
  bddflags8	INTEGER,
  bddflags9	INTEGER,
  bddflags10	INTEGER,
  bddflags11	INTEGER
);

UPDATE
  gc_soc
SET
  bddflags7=0,
  bddflags8=0,
  bddflags9=0,
  bddflags10=0,
  bddflags11=0
WHERE
  bddflags7 IS NULL;

ALTER TABLE
  gc_art
ADD
(
  ecotaxe FLOAT,
  taxepf  FLOAT 
);

UPDATE
 gc_art
SET
 ecotaxe =0,
 taxepf  =0
WHERE
  ecotaxe IS NULL; 
  
CLOSE DATABASE;

EOT

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

echo "Mise a jour terminee"
