ALTER TABLE `user` CHANGE `telephone` `telephone` VARCHAR(255) NULL DEFAULT NULL, CHANGE `telephone_fixe` `telephone_fixe` VARCHAR(255) NULL DEFAULT NULL;
ALTER TABLE `prospection` ADD `responsable_id` INT NULL AFTER `formule_id`, ADD `demande_id` INT NULL AFTER `responsable_id`;
ALTER TABLE `message` ADD `status` VARCHAR(20) NULL AFTER `sent_at`;
CREATE TABLE `messagerie_conversation_hidden_users` ( `conversation_id` INT NOT NULL, `user_id` INT NOT NULL, PRIMARY KEY (`conversation_id`, `user_id`), INDEX `IDX_MCHU_CONVERSATION` (`conversation_id`), INDEX `IDX_MCHU_USER` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE contrepartie ADD COLUMN type_valeur VARCHAR(20) DEFAULT NULL, ADD COLUMN unite VARCHAR(50) DEFAULT NULL;
CREATE TABLE realisation ( id INT AUTO_INCREMENT NOT NULL, convention_id INT DEFAULT NULL, formule_id INT DEFAULT NULL, type_contrepartie_id INT DEFAULT NULL, realise_par_id INT DEFAULT NULL, idtoken VARCHAR(255) NOT NULL, statut VARCHAR(50) DEFAULT NULL, valeur_reelle VARCHAR(255) DEFAULT NULL, unite VARCHAR(50) DEFAULT NULL, commentaire LONGTEXT DEFAULT NULL, date_realisation DATETIME DEFAULT NULL, preuve VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id) ) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci`;
ALTER TABLE `realisation` ADD `contrepartie_id` INT NULL AFTER `type_contrepartie_id`;
ALTER TABLE `contrepartie` ADD `statut` VARCHAR(255) NULL AFTER `unite`;
ALTER TABLE `contrepartie` ADD `convention_id` INT NULL AFTER `type_id`;
ALTER TABLE `contrepartie` ADD `proposition_id` INT NULL AFTER `convention_id`;
CREATE TABLE `user_permission` (`user_id` INT NOT NULL, `permission_id` INT NOT NULL, PRIMARY KEY (`user_id`, `permission_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE `parametre` CHANGE `valeur` `valeur` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL;
