ALTER TABLE tx_reservation DROP FOREIGN KEY FK_A52FD7B49E132CD4;
DROP INDEX IDX_A52FD7B49E132CD4 ON tx_reservation;
ALTER TABLE tx_reservation ADD tx_trj_collectif_id INT DEFAULT NULL, CHANGE tx_hr_id tx_trj_prive_id INT DEFAULT NULL;
ALTER TABLE tx_reservation ADD CONSTRAINT FK_A52FD7B45D25B8C4 FOREIGN KEY (tx_trj_prive_id) REFERENCES tx_trajet_prive (id) ON DELETE SET NULL;
ALTER TABLE tx_reservation ADD CONSTRAINT FK_A52FD7B4807AEF0F FOREIGN KEY (tx_trj_collectif_id) REFERENCES tx_trajet_collectif (id) ON DELETE SET NULL;
CREATE INDEX IDX_A52FD7B45D25B8C4 ON tx_reservation (tx_trj_prive_id);
CREATE INDEX IDX_A52FD7B4807AEF0F ON tx_reservation (tx_trj_collectif_id);

ALTER TABLE tx_trajet_collectif ADD tx_vehicule_id INT DEFAULT NULL;
ALTER TABLE tx_trajet_collectif ADD CONSTRAINT FK_4BB6A392ADADABF0 FOREIGN KEY (tx_vehicule_id) REFERENCES tx_vehicule (id) ON DELETE CASCADE;
CREATE INDEX IDX_4BB6A392ADADABF0 ON tx_trajet_collectif (tx_vehicule_id);
ALTER TABLE tx_trajet_prive ADD tx_vehicule_id INT DEFAULT NULL;
ALTER TABLE tx_trajet_prive ADD CONSTRAINT FK_9CFE15C7ADADABF0 FOREIGN KEY (tx_vehicule_id) REFERENCES tx_vehicule (id) ON DELETE CASCADE;
CREATE INDEX IDX_9CFE15C7ADADABF0 ON tx_trajet_prive (tx_vehicule_id);

ALTER TABLE tx_reservation ADD rsv_tarif_price DOUBLE PRECISION DEFAULT NULL;