

CREATE TABLE announce_channel (id INT AUTO_INCREMENT NOT NULL, announce_id INT NOT NULL, created_by_id INT NOT NULL, created_at DATETIME NOT NULL, INDEX IDX_9BE65F066F5DA3DE (announce_id), INDEX IDX_9BE65F06B03A8386 (created_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB;
CREATE TABLE announce_chat (id INT AUTO_INCREMENT NOT NULL, send_by_id INT NOT NULL, channel_id INT NOT NULL, message LONGTEXT NOT NULL, created_at DATETIME NOT NULL, message_type VARCHAR(255) NOT NULL, vue TINYINT(1) DEFAULT FALSE, INDEX IDX_5C9491A2C3852542 (send_by_id), INDEX IDX_5C9491A272F5A1AA (channel_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB;
ALTER TABLE announce_channel ADD CONSTRAINT FK_9BE65F066F5DA3DE FOREIGN KEY (announce_id) REFERENCES announce (id);
ALTER TABLE announce_channel ADD CONSTRAINT FK_9BE65F06B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id);
ALTER TABLE announce_chat ADD CONSTRAINT FK_5C9491A2C3852542 FOREIGN KEY (send_by_id) REFERENCES user (id);
ALTER TABLE announce_chat ADD CONSTRAINT FK_5C9491A272F5A1AA FOREIGN KEY (channel_id) REFERENCES announce_channel (id);
ALTER TABLE announce ADD vues INT DEFAULT 0, ADD description_en LONGTEXT DEFAULT NULL;
ALTER TABLE booking_room CHANGE departure_date departure_date DATETIME NOT NULL;
ALTER TABLE company ADD vues INT DEFAULT 0;
ALTER TABLE town ADD vues INT DEFAULT 0;
ALTER TABLE announce_channel ADD offer INT DEFAULT 0;