/**
 * @author jro
 * @date 08/10/21
 * @version 1.0.0
 * @project SIEau
 * @table agri_declarations_ouvrages_maj et agri_declarations_reservoirs_maj
 */

# --- !Ups

ALTER TABLE agri_prel_reservoirs DROP COLUMN IF EXISTS typeReservoir;
ALTER TABLE agri_prel_reservoirs ADD COLUMN typeReservoir bigint;
ALTER TABLE agri_declarations_reservoirs_maj DROP COLUMN IF EXISTS typeReservoir;
ALTER TABLE agri_declarations_reservoirs_maj ADD COLUMN typeReservoir bigint;

DELETE FROM CODES_SANDRE where champ='PREL_AGRI.TYPE_RESERVOIR';
INSERT INTO CODES_SANDRE ( Champ, Code, Libelle, mnemonique, Commentaire, codeReference, statut) VALUES ('PREL_AGRI.TYPE_RESERVOIR',1,'Retenue standard / existante',null,null,null,3);
INSERT INTO CODES_SANDRE ( Champ, Code, Libelle, mnemonique, Commentaire, codeReference, statut) VALUES ('PREL_AGRI.TYPE_RESERVOIR',2,'Retenue de substitution',null,null,null,3);

# --- !Downs
