-- alter table cible add column ref_contact int4 default 0; -- le nouveau dbutils corrige le blem -- CONSTRAINTS : update or add against PGML2SQL CREATE UNIQUE INDEX prospection_cible_unic_index ON prospection (ref_cible, ref_employe) WHERE fin IS NULL; --drop index idx_contact_ref_departement_key; CREATE UNIQUE INDEX cible_unic_index ON cible (ref_contact, ref_departement) WHERE ref_contact != 0; drop index idx_ef_fonction_ref_societe_key; CREATE UNIQUE INDEX idx_ne_physique_ref_societe_key ON travaille_pour (ref_personne_physique,ref_societe) WHERE fin IS NULL AND ref_personne_physique != 0; -- drop index index idx_est_assiste_par_ae_d_eae_key CREATE UNIQUE index idx_est_assiste_par_ae_d_eae_key ON est_assiste_par (ref_assiste_employe,ref_departement,ref_est_assiste_employe) WHERE fin IS NULL and ref_assiste_employe != 0; -- constraint on action file drop index idx_file_action_ref_action; create unique index idx_file_action_ref_action on file_action(ref_action) where ref_statut=0; -- constraint on societies relations CREATE UNIQUE INDEX idx_societes_en_rel_constraint ON societes_en_relation (ref_est_liee_a_societe, ref_lie_societe) WHERE ref_lie_societe != 0 AND ref_statut=0; -- default ztitle for action ALTER TABLE ACTION ALTER COLUMN ztitle SET DEFAUlT '';