CREATE TABLE tx_reservation_libre (id INT AUTO_INCREMENT NOT NULL, tx_usr_id INT DEFAULT NULL, rsv_description LONGTEXT DEFAULT NULL, rsv_num_transaction VARCHAR(100) DEFAULT NULL, rsv_extra LONGTEXT DEFAULT NULL, rsv_nbr_adulte INT DEFAULT 0 NOT NULL, rsv_nbr_enfant INT DEFAULT 0 NOT NULL, rsv_bagage INT DEFAULT 0, rsv_is_payed TINYINT(1) DEFAULT NULL, rsv_is_facture TINYINT(1) DEFAULT NULL, rsv_is_valid TINYINT(1) DEFAULT NULL, rsv_payment_type SMALLINT DEFAULT NULL, rsv_horaire_date_depart DATETIME DEFAULT NULL, rsv_horaire_date_retour DATETIME DEFAULT NULL, rsv_tarif_price DOUBLE PRECISION DEFAULT NULL, rsv_place_name_depart VARCHAR(100) DEFAULT NULL, rsv_place_name_arrivee VARCHAR(100) DEFAULT NULL, rsv_place_depart_longitude NUMERIC(10, 6) DEFAULT NULL, rsv_place_depart_latitude NUMERIC(10, 6) DEFAULT NULL, rsv_place_arrivee_longitude NUMERIC(10, 6) DEFAULT NULL, rsv_place_arrivee_latitude NUMERIC(10, 6) DEFAULT NULL, INDEX IDX_A0187A605CC5E754 (tx_usr_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
ALTER TABLE tx_reservation_libre ADD CONSTRAINT FK_A0187A605CC5E754 FOREIGN KEY (tx_usr_id) REFERENCES tx_user (id) ON DELETE CASCADE;
