VERS='5.4.55'

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

isql - - <<EOT

database gc;

update gc_parsys set version='$VERS';

create table gc_apr
(  
  aprmoby    char(15),
  contmoby   char(15),                  
  dtcreate   date,
  numdep     smallint,
  noavoir    char(15),
  statut     smallint
);

create index ix_gcapr on gc_apr (aprmoby);

create table gc_lgapr
(
  aprmoby    char (15),
  code       char (12),
  noser      char (20)
);

create index ix_gclgapr on gc_lgapr (aprmoby); 

alter table gc_lgbtc drop (contmoby);

close database;

EOT

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

echo "Mise a jour terminee"
