# A METTRE EN LIGNE -- Remettre les bons droits dans la table utilisateurs UPDATE `utilisateurs` SET `id_droit_fk` = '2' WHERE `utilisateurs`.`id_utilisateur` = 8; UPDATE `utilisateurs` SET `id_droit_fk` = '4' WHERE `utilisateurs`.`id_utilisateur` = 14; -- Ajout d'un utilsiateur ayant des droits de salarié INSERT INTO `utilisateurs` (`nom`, `prenom`, `email`, `mdp`, `id_droit_fk`, `id_entreprise_fk`, `actif`, `photo`, `note`, `num_secu`) VALUES ('Tech', 'Nico', 'technico@gmail.com', sha1('VasY75Prm'), '5', '1', '1', 'photo-2023-10-1698559157.jpg', NULL, NULL); -- Ajout de l'identifiant de la société dans différentes tables ALTER TABLE `bank` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `bic`; ALTER TABLE `bons` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `evaluation`; ALTER TABLE `bons_relance` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `email_date`; ALTER TABLE `bons_relance_download` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `heure_relance`; ALTER TABLE `carousels` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `carousel_date_fin`; ALTER TABLE `carousels_mobile` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `photo`; ALTER TABLE `clients` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `id_utilisateur_fk`; ALTER TABLE `clients_bailleur` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `client_bailleur_ville`; ALTER TABLE `clients_bannis` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `commentaire`; ALTER TABLE `factures` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `id_sales_person_FK`; ALTER TABLE `fournisseurs` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `activite`; ALTER TABLE `fournisseurs_devis` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `devis_relance`; ALTER TABLE `interventions` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `annuel`; ALTER TABLE `interventions_annuel_planning` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `nb`; ALTER TABLE `interventions_envoi` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `date_envoi`; ALTER TABLE `interverventions_rappel_1mois` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `date_envoi`; ALTER TABLE `mise_en_service` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `id_utilisateur_fk`; ALTER TABLE `parrainages` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `datep`; ALTER TABLE `prestations_tarif` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `afficher`; ALTER TABLE `produits` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `id_utilisateur_fk`; ALTER TABLE `questionnaire` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `afficher`; ALTER TABLE `ramonages` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `evaluation`; ALTER TABLE `services` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `afficher`; ALTER TABLE `suivi_km` ADD `id_entreprise_fk` INT(10) NOT NULL DEFAULT '1' AFTER `commentaire`; ALTER TABLE `primes` ADD `id_entreprise_fk` int(10) NOT NULL DEFAULT '1'; ALTER TABLE `pellet` ADD `id_entreprise_fk` int(10) NOT NULL DEFAULT '1'; ALTER TABLE `faq` ADD `id_entreprise_fk` int(10) NOT NULL DEFAULT '1'; ALTER TABLE `fournisseurs_contact` ADD `id_entreprise_fk` int(10) NOT NULL DEFAULT '1'; ALTER TABLE `comissions` ADD `id_entreprise_fk` int(10) NOT NULL DEFAULT '1'; ALTER TABLE `depenses` ADD `id_entreprise_fk` int(10) NOT NULL DEFAULT '1'; ALTER TABLE `depenses_type` ADD `id_entreprise_fk` int(10) NOT NULL DEFAULT '1'; ALTER TABLE `clients_appareils` ADD `id_entreprise_fk` int(10) NULL DEFAULT '1'; ALTER TABLE `pieces_changement` ADD `id_entreprise_fk` int(10) NOT NULL DEFAULT '1'; -- Ajout de nouveaux champs dans la table interventions ALTER TABLE `interventions` ADD `traite_raison` text COLLATE 'utf8_general_ci' NULL AFTER `traite`; ALTER TABLE `interventions` CHANGE `traite` `traite` int(1) NOT NULL DEFAULT '0' COMMENT '1=Oui, 0=Non, 2=Annule, 3=Annule PGE' AFTER `pieces_changer_statut_fk`; ALTER TABLE `interventions` ADD `valide_direction` int(1) NULL AFTER `traite_raison`;