CREATE TABLE tx_trajet (id INT AUTO_INCREMENT NOT NULL, tx_place_id_depart INT DEFAULT NULL, tx_place_id_arrive INT DEFAULT NULL, trj_name VARCHAR(100) DEFAULT NULL, trj_distance DOUBLE PRECISION DEFAULT NULL, trj_desc VARCHAR(255) DEFAULT NULL, INDEX IDX_7BF79D23FF8D26CF (tx_place_id_depart), INDEX IDX_7BF79D23D746802B (tx_place_id_arrive), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
ALTER TABLE tx_trajet ADD CONSTRAINT FK_7BF79D23FF8D26CF FOREIGN KEY (tx_place_id_depart) REFERENCES tx_place (id) ON DELETE CASCADE;
ALTER TABLE tx_trajet ADD CONSTRAINT FK_7BF79D23D746802B FOREIGN KEY (tx_place_id_arrive) REFERENCES tx_place (id) ON DELETE CASCADE;