DROP TABLE IF EXISTS `toolbox_action`;
CREATE TABLE `toolbox_action` (
  `PK_toolbox_action_id` int(11) NOT NULL,
  `FK_toolbox_directory_id` int(11) NOT NULL DEFAULT 0,
  `FK_toolbox_action_type_id` int(11) NOT NULL DEFAULT 0,
  `FK_toolbox_customer_id` int(11) NOT NULL DEFAULT 0,
  `FK_toolbox_project_id` int(11) NOT NULL DEFAULT 0,
  `libelle_toolbox_action` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `description_toolbox_action` text COLLATE utf8_unicode_ci NOT NULL,
  `date_toolbox_action` date NOT NULL DEFAULT '0000-00-00',
  `time_toolbox_action` time NOT NULL DEFAULT '00:00:00',
  `date_creation_toolbox_action` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `actif_toolbox_action` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_action_customer_contact`;
CREATE TABLE `toolbox_action_customer_contact` (
  `PK_toolbox_action_customer_contact_id` int(11) NOT NULL,
  `FK_toolbox_action_id` int(11) NOT NULL,
  `FK_toolbox_customer_contact_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_action_directory`;
CREATE TABLE `toolbox_action_directory` (
  `PK_toolbox_action_directory_id` int(11) NOT NULL,
  `FK_toolbox_action_id` int(11) NOT NULL,
  `FK_toolbox_directory_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_action_status`;
CREATE TABLE `toolbox_action_status` (
  `PK_toolbox_action_status_id` int(11) NOT NULL,
  `libelle_toolbox_action_status` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `alerte_toolbox_action_status` int(11) NOT NULL DEFAULT 0,
  `ordre_toolbox_action_status` int(11) NOT NULL DEFAULT 0,
  `actif_toolbox_action_status` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_action_status_history`;
CREATE TABLE `toolbox_action_status_history` (
  `PK_toolbox_action_status_history_id` int(11) NOT NULL,
  `FK_toolbox_action_id` int(11) NOT NULL,
  `FK_toolbox_action_status_id` int(11) NOT NULL,
  `date_toolbox_action_status_history` datetime NOT NULL,
  `actif_toolbox_action_status_history` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_action_type`;
CREATE TABLE `toolbox_action_type` (
  `PK_toolbox_action_type_id` int(11) NOT NULL,
  `libelle_toolbox_action_type` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `icon_toolbox_action_type` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `actif_toolbox_action_type` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_company`;
CREATE TABLE `toolbox_company` (
  `PK_toolbox_company_id` int(11) NOT NULL,
  `libelle_toolbox_company` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `acronyme_toolbox_company` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `adresse_toolbox_company` varchar(600) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `adresse1_toolbox_company` varchar(600) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `code_postal_toolbox_company` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `ville_toolbox_company` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `FK_pays_id` int(11) NOT NULL DEFAULT 0,
  `telephone_toolbox_company` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `fax_toolbox_company` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `tva_toolbox_company` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `rcs_toolbox_company` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `email_contact_toolbox_company` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `email_comptabilite_toolbox_company` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `logo_toolbox_company` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `signature_toolbox_company` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `actif_toolbox_company` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_company_position`;
CREATE TABLE `toolbox_company_position` (
  `PK_toolbox_company_position_id` int(11) NOT NULL,
  `libelle_toolbox_company_position` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `actif_toolbox_company_position` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_customer`;
CREATE TABLE `toolbox_customer` (
  `PK_toolbox_customer_id` int(11) NOT NULL,
  `FK_toolbox_directory_id` int(11) NOT NULL DEFAULT 0,
  `FK_toolbox_customer_id` int(11) NOT NULL DEFAULT 0,
  `FK_toolbox_customer_type_id` int(11) NOT NULL DEFAULT 0,
  `FK_toolbox_customer_activity_id` int(11) NOT NULL DEFAULT 0,
  `FK_toolbox_customer_status_id` int(11) NOT NULL DEFAULT 0,
  `FK_toolbox_customer_origin_id` int(11) NOT NULL DEFAULT 0,
  `libelle_toolbox_customer` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `siret_toolbox_customer` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '''''',
  `adresse_toolbox_customer` varchar(600) COLLATE utf8_unicode_ci DEFAULT '''''',
  `code_postal_toolbox_customer` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '''''',
  `ville_toolbox_customer` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '''''',
  `FK_pays_id` int(11) DEFAULT NULL,
  `employee_toolbox_customer` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `telephone_toolbox_customer` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `fax_toolbox_customer` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `tva_toolbox_customer` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `activity_toolbox_customer` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `old_num_toolbox_customer` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `date_creation_toolbox_customer` date NOT NULL DEFAULT '0000-00-00',
  `actif_toolbox_customer` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_customer_activity`;
CREATE TABLE `toolbox_customer_activity` (
  `PK_toolbox_customer_activity_id` int(11) NOT NULL,
  `libelle_toolbox_customer_activity` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `actif_toolbox_customer_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_customer_contact`;
CREATE TABLE `toolbox_customer_contact` (
  `PK_toolbox_customer_contact_id` int(11) NOT NULL,
  `FK_toolbox_customer_id` int(11) NOT NULL,
  `FK_toolbox_position_id` int(11) NOT NULL DEFAULT 0,
  `FK_toolbox_customer_contact_type_id` int(11) NOT NULL DEFAULT 0,
  `last_name_toolbox_customer_contact` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `first_name_toolbox_customer_contact` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `email_toolbox_customer_contact` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `fonction_toolbox_customer_contact` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `telephone_toolbox_customer_contact` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `mobile_toolbox_customer_contact` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `comment_toolbox_customer_contact` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `vip_toolbox_customer_contact` int(11) NOT NULL DEFAULT 0,
  `actif_toolbox_customer_contact` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_customer_contact_type`;
CREATE TABLE `toolbox_customer_contact_type` (
  `PK_toolbox_customer_contact_type_id` int(11) NOT NULL,
  `libelle_toolbox_customer_contact_type` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `ordre_toolbox_customer_contact_type` int(11) NOT NULL DEFAULT 0,
  `color_toolbox_customer_contact` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'green',
  `actif_toolbox_customer_contact_type` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_customer_origin`;
CREATE TABLE `toolbox_customer_origin` (
  `PK_toolbox_customer_origin_id` int(11) NOT NULL,
  `libelle_toolbox_customer_origin` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `actif_toolbox_customer_origin` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_customer_status`;
CREATE TABLE `toolbox_customer_status` (
  `PK_toolbox_customer_status_id` int(11) NOT NULL,
  `libelle_toolbox_customer_status` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `ordre_toolbox_customer_status` int(11) NOT NULL DEFAULT 0,
  `actif_toolbox_customer_status` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_customer_type`;
CREATE TABLE `toolbox_customer_type` (
  `PK_toolbox_customer_type_id` int(11) NOT NULL,
  `libelle_toolbox_customer_type` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `actif_toolbox_customer_type` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_departement`;
CREATE TABLE `toolbox_departement` (
  `PK_toolbox_departement_id` int(11) NOT NULL,
  `numero_toolbox_departement` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `libelle_toolbox_departement` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `region_toolbox_departement` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `actif_toolbox_departement` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_directory`;
CREATE TABLE `toolbox_directory` (
  `PK_toolbox_directory_id` int(11) NOT NULL,
  `FK_users_id` int(11) NOT NULL,
  `FK_toolbox_company_id` int(11) NOT NULL,
  `departement` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `chiffre_toolbox_directory` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `chiffre_more_toolbox_directory` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `signature_toolbox_directory` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `project_toolbox_directory` int(11) NOT NULL DEFAULT 0,
  `order_toolbox_directory` int(11) NOT NULL DEFAULT 1,
  `bill_toolbox_directory` int(11) NOT NULL DEFAULT 0,
  `stats_toolbox_directory` int(11) NOT NULL DEFAULT 0,
  `crm_toolbox_directory` int(11) NOT NULL DEFAULT 0,
  `admin_crm_toolbox_directory` int(1) NOT NULL DEFAULT 0,
  `admin_toolbox_directory` int(11) NOT NULL DEFAULT 0,
  `actif_toolbox_directory` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_directory_company`;
CREATE TABLE `toolbox_directory_company` (
  `PK_toolbox_directory_company_id` int(11) NOT NULL,
  `FK_toolbox_directory_id` int(11) NOT NULL,
  `FK_toolbox_company_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_directory_company_valid`;
CREATE TABLE `toolbox_directory_company_valid` (
  `PK_toolbox_directory_company_valid_id` int(11) NOT NULL,
  `FK_toolbox_directory_id` int(11) NOT NULL,
  `FK_toolbox_company_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_directory_position`;
CREATE TABLE `toolbox_directory_position` (
  `PK_toolbox_directory_position_id` int(11) NOT NULL,
  `FK_toolbox_directory_id` int(11) NOT NULL,
  `FK_toolbox_company_position_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_order`;
CREATE TABLE `toolbox_order` (
  `PK_toolbox_order_id` int(11) NOT NULL,
  `FK_toolbox_company_id` int(11) NOT NULL,
  `FK_toolbox_project_id` int(11) NOT NULL,
  `FK_toolbox_provider_id` int(11) NOT NULL,
  `FK_toolbox_directory_id` int(11) NOT NULL,
  `FK_toolbox_order_currency_id` int(11) NOT NULL,
  `number_toolbox_order` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `date_toolbox_order` date NOT NULL DEFAULT '0000-00-00',
  `devis_toolbox_order` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `devis_provider_toolbox_order` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `file_provider_toolbox_order` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `commanditaire` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `departement_toolbox_order` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `toolbox_order_total_ht` decimal(10,2) NOT NULL DEFAULT 0.00,
  `toolbox_order_total_tva` decimal(10,2) NOT NULL DEFAULT 0.00,
  `toolbox_order_total_tva1` decimal(10,2) NOT NULL DEFAULT 0.00,
  `toolbox_order_total_ttc` float(10,2) NOT NULL DEFAULT 0.00,
  `toolbox_order_mode` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `valide_id` int(11) NOT NULL DEFAULT 0,
  `valide_toolbox_order` int(11) NOT NULL DEFAULT 0,
  `valide_wait_toolbox_order` int(11) NOT NULL DEFAULT 0,
  `valide_toolbox_commentaire` text COLLATE utf8_unicode_ci NOT NULL,
  `emetteur_toolbox_commentaire` text COLLATE utf8_unicode_ci NOT NULL,
  `bill_toolbox_order` int(11) NOT NULL DEFAULT 0,
  `bill_file_toolbox_order` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `bill_date_toolbox_order` date NOT NULL DEFAULT '0000-00-00',
  `date_valide_toolbox_order` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `date_creation_toolbox_order` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_order_currency`;
CREATE TABLE `toolbox_order_currency` (
  `PK_toolbox_order_currency_id` int(11) NOT NULL,
  `libelle_toolbox_order_currency` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `default_toolbox_order_currency` int(11) NOT NULL,
  `actif_toolbox_order_currency` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_order_line`;
CREATE TABLE `toolbox_order_line` (
  `PK_toolbox_order_line_id` int(11) NOT NULL,
  `FK_toolbox_order_id` int(11) NOT NULL,
  `libelle_toolbox_order_line` text COLLATE utf8_unicode_ci NOT NULL,
  `price_toolbox_order_line` decimal(10,2) NOT NULL DEFAULT 0.00,
  `quantity_toolbox_order_line` int(11) NOT NULL DEFAULT 0,
  `tva_toolbox_order_line` decimal(10,2) NOT NULL DEFAULT 1.00,
  `empty_toolbox_order_line` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_position`;
CREATE TABLE `toolbox_position` (
  `PK_toolbox_position_id` int(11) NOT NULL,
  `libelle_toolbox_position` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `actif_toolbox_position` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_project`;
CREATE TABLE `toolbox_project` (
  `PK_toolbox_project_id` int(11) NOT NULL,
  `FK_toolbox_customer_id` int(11) NOT NULL,
  `FK_toolbox_company_id` int(11) NOT NULL,
  `FK_toolbox_project_type_id` int(11) NOT NULL DEFAULT 0,
  `FK_toolbox_project_status_id` int(11) NOT NULL DEFAULT 1,
  `FK_toolbox_customer_contact_id` int(11) NOT NULL DEFAULT 0,
  `id_commercial` int(11) NOT NULL DEFAULT 0,
  `id_project_manager` int(11) NOT NULL DEFAULT 0,
  `libelle_toolbox_project` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `number_toolbox_project` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `old_number_toolbox_project` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `statut_toolbox_projet` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `description_toolbox_project` text COLLATE utf8_unicode_ci NOT NULL,
  `date_toolbox_project` date NOT NULL DEFAULT '0000-00-00',
  `date_begin_toolbox_project` date NOT NULL DEFAULT '0000-00-00',
  `date_rendu_toolbox_project` date NOT NULL DEFAULT '0000-00-00',
  `date_end_toolbox_project` date NOT NULL DEFAULT '0000-00-00',
  `estimation_toolbox_project` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `estimation_marge_toolbox_project` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `taux_marge_toolbox_project` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `estimation_marge_wish_toolbox_project` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `taux_marge_wish_toolbox_project` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `chance_toolbox_project` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `participant_toolbox_project` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `where_toolbox_project` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `FK_pays_id` int(11) NOT NULL DEFAULT 0,
  `date_creation_toolbox_project` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `actif_toolbox_project` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_project_status`;
CREATE TABLE `toolbox_project_status` (
  `PK_toolbox_project_status_id` int(11) NOT NULL,
  `libelle_toolbox_project_status` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `ordre_toolbox_project_status` int(11) NOT NULL DEFAULT 0,
  `include_toolbox_project_status` int(11) NOT NULL DEFAULT 0,
  `actif_toolbox_project_status` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_project_team`;
CREATE TABLE `toolbox_project_team` (
  `PK_toolbox_project_team_id` int(11) NOT NULL,
  `FK_toolbox_project_id` int(11) NOT NULL,
  `FK_toolbox_directory_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_project_type`;
CREATE TABLE `toolbox_project_type` (
  `PK_toolbox_project_type_id` int(11) NOT NULL,
  `libelle_toolbox_project_type` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `actif_toolbox_project_type` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_provider`;
CREATE TABLE `toolbox_provider` (
  `PK_toolbox_provider_id` int(11) NOT NULL,
  `FK_toolbox_provider_type_id` int(11) NOT NULL,
  `FK_toolbox_provider_category_id` int(11) NOT NULL DEFAULT 0,
  `FK_toolbox_departement_id` int(11) NOT NULL,
  `libelle_toolbox_provider` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `adresse_toolbox_provider` varchar(600) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `code_postal_toolbox_provider` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `ville_toolbox_provider` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `FK_pays_id` int(11) NOT NULL DEFAULT 0,
  `web_toolbox_provider` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `telephone_toolbox_provider` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `fax_toolbox_provider` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `tva_toolbox_provider` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `iso_toolbox_provider` int(11) NOT NULL DEFAULT 0,
  `green_toolbox_provider` int(11) NOT NULL DEFAULT 0,
  `date_creation_toolbox_provider` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `prestateque_toolbox_provider` int(11) NOT NULL DEFAULT 0,
  `actif_toolbox_provider` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_provider_category`;
CREATE TABLE `toolbox_provider_category` (
  `PK_toolbox_provider_category_id` int(11) NOT NULL,
  `libelle_toolbox_provider_category` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `actif_toolbox_provider_category` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_provider_contact`;
CREATE TABLE `toolbox_provider_contact` (
  `PK_toolbox_provider_contact_id` int(11) NOT NULL,
  `FK_toolbox_provider_id` int(11) NOT NULL,
  `FK_toolbox_position_id` int(11) NOT NULL DEFAULT 0,
  `last_name_toolbox_provider_contact` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `first_name_toolbox_provider_contact` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `email_toolbox_provider_contact` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `fonction_toolbox_provider_contact` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `telephone_toolbox_provider_contact` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `mobile_toolbox_provider_contact` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `comment_toolbox_provider_contact` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `actif_toolbox_provider_contact` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_provider_countries`;
CREATE TABLE `toolbox_provider_countries` (
  `PK_toolbox_provider_countries_id` int(11) NOT NULL,
  `FK_toolbox_provider_id` int(11) NOT NULL,
  `FK_pays_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_provider_note`;
CREATE TABLE `toolbox_provider_note` (
  `PK_toolbox_provider_note_id` int(11) NOT NULL,
  `FK_toolbox_provider_id` int(11) NOT NULL,
  `FK_toolbox_directory_id` int(11) NOT NULL,
  `note_toolbox_provider` int(11) NOT NULL,
  `comment_toolbox_provider` text COLLATE utf8_unicode_ci NOT NULL,
  `date_note_toolbox_provider` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_provider_type`;
CREATE TABLE `toolbox_provider_type` (
  `PK_toolbox_provider_type_id` int(11) NOT NULL,
  `libelle_toolbox_provider_type` varchar(500) COLLATE utf8_unicode_ci NOT NULL,
  `actif_toolbox_provider_type` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `toolbox_update`;
CREATE TABLE `toolbox_update` (
  `PK_toolbox_update_id` int(11) NOT NULL,
  `FK_toolbox_directory_id` int(11) NOT NULL,
  `table_name` varchar(220) COLLATE utf8_unicode_ci NOT NULL,
  `id` int(11) NOT NULL,
  `new_data` int(11) NOT NULL DEFAULT 0,
  `date_update` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


ALTER TABLE `toolbox_action`
  ADD PRIMARY KEY (`PK_toolbox_action_id`),
  ADD KEY `actif_toolbox_action` (`actif_toolbox_action`),
  ADD KEY `date_creation_toolbox_action` (`date_creation_toolbox_action`),
  ADD KEY `time_toolbox_action` (`time_toolbox_action`),
  ADD KEY `date_toolbox_action` (`date_toolbox_action`),
  ADD KEY `libelle_toolbox_action` (`libelle_toolbox_action`),
  ADD KEY `FK_toolbox_project_id` (`FK_toolbox_project_id`),
  ADD KEY `FK_toolbox_customer_id` (`FK_toolbox_customer_id`),
  ADD KEY `FK_toolbox_directory_id` (`FK_toolbox_directory_id`),
  ADD KEY `FK_toolbox_action_type_id` (`FK_toolbox_action_type_id`);

ALTER TABLE `toolbox_action_customer_contact`
  ADD PRIMARY KEY (`PK_toolbox_action_customer_contact_id`),
  ADD KEY `FK_toolbox_action_id` (`FK_toolbox_action_id`),
  ADD KEY `FK_toolbox_customer_contact_id` (`FK_toolbox_customer_contact_id`);

ALTER TABLE `toolbox_action_directory`
  ADD PRIMARY KEY (`PK_toolbox_action_directory_id`),
  ADD KEY `FK_toolbox_action_id` (`FK_toolbox_action_id`),
  ADD KEY `FK_toolbox_directory_id` (`FK_toolbox_directory_id`);

ALTER TABLE `toolbox_action_status`
  ADD PRIMARY KEY (`PK_toolbox_action_status_id`),
  ADD KEY `libelle_toolbox_customer_type` (`libelle_toolbox_action_status`),
  ADD KEY `actif_toolbox_customer_type` (`actif_toolbox_action_status`),
  ADD KEY `alerte_toolbox_action_status` (`alerte_toolbox_action_status`),
  ADD KEY `ordre_toolbox_action_status` (`ordre_toolbox_action_status`);

ALTER TABLE `toolbox_action_status_history`
  ADD PRIMARY KEY (`PK_toolbox_action_status_history_id`),
  ADD KEY `FK_toolbox_action_id` (`FK_toolbox_action_id`),
  ADD KEY `FK_toolbox_action_status_id` (`FK_toolbox_action_status_id`),
  ADD KEY `date_toolbox_action_status_history` (`date_toolbox_action_status_history`),
  ADD KEY `actif_toolbox_action_status_history` (`actif_toolbox_action_status_history`);

ALTER TABLE `toolbox_action_type`
  ADD PRIMARY KEY (`PK_toolbox_action_type_id`),
  ADD KEY `libelle_toolbox_customer_type` (`libelle_toolbox_action_type`),
  ADD KEY `actif_toolbox_customer_type` (`actif_toolbox_action_type`);

ALTER TABLE `toolbox_company`
  ADD PRIMARY KEY (`PK_toolbox_company_id`),
  ADD KEY `actif_toolbox_company` (`actif_toolbox_company`),
  ADD KEY `libelle_toolbox_company` (`libelle_toolbox_company`);

ALTER TABLE `toolbox_company_position`
  ADD PRIMARY KEY (`PK_toolbox_company_position_id`),
  ADD KEY `actif_toolbox_company_position` (`actif_toolbox_company_position`),
  ADD KEY `libelle_toolbox_company_position` (`libelle_toolbox_company_position`);

ALTER TABLE `toolbox_customer`
  ADD PRIMARY KEY (`PK_toolbox_customer_id`),
  ADD KEY `libelle_toolbox_customer` (`libelle_toolbox_customer`),
  ADD KEY `actif_toolbox_customer` (`actif_toolbox_customer`),
  ADD KEY `FK_toolbox_customer_id` (`FK_toolbox_customer_id`),
  ADD KEY `siret_toolbox_customer` (`siret_toolbox_customer`),
  ADD KEY `FK_toolbox_directory_id` (`FK_toolbox_directory_id`),
  ADD KEY `FK_toolbox_customer_type_id` (`FK_toolbox_customer_type_id`),
  ADD KEY `FK_toolbox_customer_activity_id` (`FK_toolbox_customer_activity_id`),
  ADD KEY `status_toolbox_customer` (`FK_toolbox_customer_status_id`),
  ADD KEY `origin_toolbox_customer` (`FK_toolbox_customer_origin_id`),
  ADD KEY `employee_toolbox_customer` (`employee_toolbox_customer`),
  ADD KEY `FK_toolbox_customer_status_id` (`FK_toolbox_customer_status_id`),
  ADD KEY `FK_toolbox_customer_origin_id` (`FK_toolbox_customer_origin_id`);

ALTER TABLE `toolbox_customer_activity`
  ADD PRIMARY KEY (`PK_toolbox_customer_activity_id`),
  ADD KEY `libelle_toolbox_customer_type` (`libelle_toolbox_customer_activity`),
  ADD KEY `actif_toolbox_customer_type` (`actif_toolbox_customer_activity`);

ALTER TABLE `toolbox_customer_contact`
  ADD PRIMARY KEY (`PK_toolbox_customer_contact_id`),
  ADD KEY `FK_toolbox_cutomer_id` (`FK_toolbox_customer_id`),
  ADD KEY `last_name_toolbox_customer` (`last_name_toolbox_customer_contact`),
  ADD KEY `first_name_toolbox_customer` (`first_name_toolbox_customer_contact`),
  ADD KEY `email_toolbox_customer` (`email_toolbox_customer_contact`),
  ADD KEY `actif_toolbox_customer` (`actif_toolbox_customer_contact`),
  ADD KEY `FK_toolbox_company_position_id` (`FK_toolbox_position_id`),
  ADD KEY `FK_toolbox_customer_contact_type_id` (`FK_toolbox_customer_contact_type_id`),
  ADD KEY `vip_toolbox_customer_contact` (`vip_toolbox_customer_contact`);

ALTER TABLE `toolbox_customer_contact_type`
  ADD PRIMARY KEY (`PK_toolbox_customer_contact_type_id`),
  ADD KEY `libelle_toolbox_customer_type` (`libelle_toolbox_customer_contact_type`),
  ADD KEY `actif_toolbox_customer_type` (`actif_toolbox_customer_contact_type`),
  ADD KEY `ordre_toolbox_customer_contact_type` (`ordre_toolbox_customer_contact_type`);

ALTER TABLE `toolbox_customer_origin`
  ADD PRIMARY KEY (`PK_toolbox_customer_origin_id`),
  ADD KEY `libelle_toolbox_customer_type` (`libelle_toolbox_customer_origin`),
  ADD KEY `actif_toolbox_customer_type` (`actif_toolbox_customer_origin`);

ALTER TABLE `toolbox_customer_status`
  ADD PRIMARY KEY (`PK_toolbox_customer_status_id`),
  ADD KEY `libelle_toolbox_customer_type` (`libelle_toolbox_customer_status`),
  ADD KEY `actif_toolbox_customer_type` (`actif_toolbox_customer_status`),
  ADD KEY `ordre_toolbox_customer_status` (`ordre_toolbox_customer_status`);

ALTER TABLE `toolbox_customer_type`
  ADD PRIMARY KEY (`PK_toolbox_customer_type_id`),
  ADD KEY `libelle_toolbox_customer_type` (`libelle_toolbox_customer_type`),
  ADD KEY `actif_toolbox_customer_type` (`actif_toolbox_customer_type`);

ALTER TABLE `toolbox_departement`
  ADD PRIMARY KEY (`PK_toolbox_departement_id`),
  ADD KEY `numero_toolbox_departement` (`numero_toolbox_departement`),
  ADD KEY `libelle_toolbox_departement` (`libelle_toolbox_departement`);

ALTER TABLE `toolbox_directory`
  ADD PRIMARY KEY (`PK_toolbox_directory_id`),
  ADD KEY `FK_admin_users_id` (`FK_users_id`),
  ADD KEY `departement` (`departement`),
  ADD KEY `FK_toolbox_company_id` (`FK_toolbox_company_id`),
  ADD KEY `admin_toolbox_directory` (`admin_toolbox_directory`),
  ADD KEY `actif_toolbox_directory` (`actif_toolbox_directory`),
  ADD KEY `chiffre_toolbox_directory` (`chiffre_toolbox_directory`),
  ADD KEY `crm_toolbox_directory` (`crm_toolbox_directory`),
  ADD KEY `chiffre_more_toolbox_directory` (`chiffre_more_toolbox_directory`),
  ADD KEY `chiffre_toolbox_directory_2` (`chiffre_toolbox_directory`),
  ADD KEY `order_toolbox_directory` (`order_toolbox_directory`),
  ADD KEY `admin_crm_toolbox_directory` (`admin_crm_toolbox_directory`);

ALTER TABLE `toolbox_directory_company`
  ADD PRIMARY KEY (`PK_toolbox_directory_company_id`),
  ADD KEY `FK_toolbox_directory_id` (`FK_toolbox_directory_id`),
  ADD KEY `FK_toolbox_company_position_id` (`FK_toolbox_company_id`);

ALTER TABLE `toolbox_directory_company_valid`
  ADD PRIMARY KEY (`PK_toolbox_directory_company_valid_id`),
  ADD KEY `FK_toolbox_directory_id` (`FK_toolbox_directory_id`),
  ADD KEY `FK_toolbox_company_position_id` (`FK_toolbox_company_id`);

ALTER TABLE `toolbox_directory_position`
  ADD PRIMARY KEY (`PK_toolbox_directory_position_id`),
  ADD KEY `FK_toolbox_directory_id` (`FK_toolbox_directory_id`),
  ADD KEY `FK_toolbox_company_position_id` (`FK_toolbox_company_position_id`);

ALTER TABLE `toolbox_order`
  ADD PRIMARY KEY (`PK_toolbox_order_id`),
  ADD UNIQUE KEY `number_toolbox_order` (`number_toolbox_order`),
  ADD KEY `FK_project_id` (`FK_toolbox_project_id`),
  ADD KEY `valide_toolbox_order` (`valide_toolbox_order`),
  ADD KEY `date_valide_toolbox_order` (`date_valide_toolbox_order`),
  ADD KEY `commanditaire` (`commanditaire`),
  ADD KEY `FK_toolbox_customer_id` (`FK_toolbox_provider_id`),
  ADD KEY `FK_toolbox_directory_id` (`FK_toolbox_directory_id`),
  ADD KEY `date_toolbox_order` (`date_toolbox_order`),
  ADD KEY `devis_toolbox_order` (`devis_toolbox_order`),
  ADD KEY `FK_toolbox_company_id` (`FK_toolbox_company_id`),
  ADD KEY `valide_id` (`valide_id`),
  ADD KEY `FK_toolbox_order_currency_id` (`FK_toolbox_order_currency_id`),
  ADD KEY `devis_provider_toolbox_order` (`devis_provider_toolbox_order`);

ALTER TABLE `toolbox_order_currency`
  ADD PRIMARY KEY (`PK_toolbox_order_currency_id`),
  ADD KEY `actif_puchase_order_currency` (`actif_toolbox_order_currency`),
  ADD KEY `default_toolbox_order_curency` (`default_toolbox_order_currency`);

ALTER TABLE `toolbox_order_line`
  ADD PRIMARY KEY (`PK_toolbox_order_line_id`),
  ADD KEY `FK_toolbox_order_id` (`FK_toolbox_order_id`),
  ADD KEY `empty_toolbox_order_line` (`empty_toolbox_order_line`);

ALTER TABLE `toolbox_position`
  ADD PRIMARY KEY (`PK_toolbox_position_id`),
  ADD KEY `actif_toolbox_position` (`actif_toolbox_position`) USING BTREE,
  ADD KEY `libelle_toolbox_position` (`libelle_toolbox_position`) USING BTREE;

ALTER TABLE `toolbox_project`
  ADD PRIMARY KEY (`PK_toolbox_project_id`),
  ADD KEY `libelle_project` (`libelle_toolbox_project`),
  ADD KEY `number_project` (`number_toolbox_project`),
  ADD KEY `actif_project` (`actif_toolbox_project`),
  ADD KEY `FK_toolbox_customer_id` (`FK_toolbox_customer_id`),
  ADD KEY `id_commercial` (`id_commercial`),
  ADD KEY `id_project_manager` (`id_project_manager`),
  ADD KEY `FK_toolbox_company_id` (`FK_toolbox_company_id`),
  ADD KEY `statut_toolbox_projet` (`statut_toolbox_projet`),
  ADD KEY `FK_toolbox_project_type_id` (`FK_toolbox_project_type_id`),
  ADD KEY `FK_toolbox_customer_contact_id` (`FK_toolbox_customer_contact_id`),
  ADD KEY `FK_pays_id` (`FK_pays_id`),
  ADD KEY `participant_toolbox_project` (`participant_toolbox_project`),
  ADD KEY `FK_toolbox_project_status_id` (`FK_toolbox_project_status_id`),
  ADD KEY `date_toolbox_project` (`date_toolbox_project`),
  ADD KEY `taux_marge_toolbox_project` (`taux_marge_toolbox_project`);

ALTER TABLE `toolbox_project_status`
  ADD PRIMARY KEY (`PK_toolbox_project_status_id`),
  ADD KEY `actif_toolbox_project_status` (`actif_toolbox_project_status`),
  ADD KEY `ordre_toolbox_project_status` (`ordre_toolbox_project_status`),
  ADD KEY `include_toolbox_project_status` (`include_toolbox_project_status`);

ALTER TABLE `toolbox_project_team`
  ADD PRIMARY KEY (`PK_toolbox_project_team_id`),
  ADD KEY `FK_toolbox_project_id` (`FK_toolbox_project_id`),
  ADD KEY `FK_toolbox_directory_id` (`FK_toolbox_directory_id`);

ALTER TABLE `toolbox_project_type`
  ADD PRIMARY KEY (`PK_toolbox_project_type_id`),
  ADD KEY `actif_toolbox_project_type` (`actif_toolbox_project_type`),
  ADD KEY `libelle_toolbox_project_type` (`libelle_toolbox_project_type`);

ALTER TABLE `toolbox_provider`
  ADD PRIMARY KEY (`PK_toolbox_provider_id`),
  ADD KEY `libelle_toolbox_customer` (`libelle_toolbox_provider`),
  ADD KEY `actif_toolbox_customer` (`actif_toolbox_provider`),
  ADD KEY `FK_toolbox_provider_type_id` (`FK_toolbox_provider_type_id`),
  ADD KEY `FK_toolbox_departement_id` (`FK_toolbox_departement_id`),
  ADD KEY `FK_toolbox_provider_category_id` (`FK_toolbox_provider_category_id`),
  ADD KEY `prestateque_toolbox_provider` (`prestateque_toolbox_provider`);

ALTER TABLE `toolbox_provider_category`
  ADD PRIMARY KEY (`PK_toolbox_provider_category_id`),
  ADD KEY `libelle_toolbox_provider_category` (`libelle_toolbox_provider_category`),
  ADD KEY `actif_toolbox_provider_category` (`actif_toolbox_provider_category`);

ALTER TABLE `toolbox_provider_contact`
  ADD PRIMARY KEY (`PK_toolbox_provider_contact_id`) USING BTREE,
  ADD KEY `FK_toolbox_cutomer_id` (`FK_toolbox_provider_id`),
  ADD KEY `last_name_toolbox_customer` (`last_name_toolbox_provider_contact`),
  ADD KEY `first_name_toolbox_customer` (`first_name_toolbox_provider_contact`),
  ADD KEY `email_toolbox_customer` (`email_toolbox_provider_contact`),
  ADD KEY `actif_toolbox_customer` (`actif_toolbox_provider_contact`),
  ADD KEY `FK_toolbox_company_position_id` (`FK_toolbox_position_id`);

ALTER TABLE `toolbox_provider_countries`
  ADD PRIMARY KEY (`PK_toolbox_provider_countries_id`),
  ADD KEY `FK_toolbox_provider_id` (`FK_toolbox_provider_id`),
  ADD KEY `FK_pays_id` (`FK_pays_id`);

ALTER TABLE `toolbox_provider_note`
  ADD PRIMARY KEY (`PK_toolbox_provider_note_id`),
  ADD KEY `FK_toolbox_directory_id` (`FK_toolbox_directory_id`),
  ADD KEY `note_toolbox_provider` (`note_toolbox_provider`),
  ADD KEY `FK_toolbox_provider_id` (`FK_toolbox_provider_id`);

ALTER TABLE `toolbox_provider_type`
  ADD PRIMARY KEY (`PK_toolbox_provider_type_id`) USING BTREE,
  ADD KEY `actif_toolbox_provider_type` (`actif_toolbox_provider_type`) USING BTREE,
  ADD KEY `libelle_toolbox_provider_type` (`libelle_toolbox_provider_type`(333)) USING BTREE;

ALTER TABLE `toolbox_update`
  ADD PRIMARY KEY (`PK_toolbox_update_id`),
  ADD KEY `FK_toolbox_directory_id` (`FK_toolbox_directory_id`),
  ADD KEY `table_name` (`table_name`),
  ADD KEY `date_update` (`date_update`);


ALTER TABLE `toolbox_action`
  MODIFY `PK_toolbox_action_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_action_customer_contact`
  MODIFY `PK_toolbox_action_customer_contact_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_action_directory`
  MODIFY `PK_toolbox_action_directory_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_action_status`
  MODIFY `PK_toolbox_action_status_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_action_status_history`
  MODIFY `PK_toolbox_action_status_history_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_action_type`
  MODIFY `PK_toolbox_action_type_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_company`
  MODIFY `PK_toolbox_company_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_company_position`
  MODIFY `PK_toolbox_company_position_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_customer`
  MODIFY `PK_toolbox_customer_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_customer_activity`
  MODIFY `PK_toolbox_customer_activity_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_customer_contact`
  MODIFY `PK_toolbox_customer_contact_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_customer_contact_type`
  MODIFY `PK_toolbox_customer_contact_type_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_customer_origin`
  MODIFY `PK_toolbox_customer_origin_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_customer_status`
  MODIFY `PK_toolbox_customer_status_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_customer_type`
  MODIFY `PK_toolbox_customer_type_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_departement`
  MODIFY `PK_toolbox_departement_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_directory`
  MODIFY `PK_toolbox_directory_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_directory_company`
  MODIFY `PK_toolbox_directory_company_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_directory_company_valid`
  MODIFY `PK_toolbox_directory_company_valid_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_directory_position`
  MODIFY `PK_toolbox_directory_position_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_order`
  MODIFY `PK_toolbox_order_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_order_currency`
  MODIFY `PK_toolbox_order_currency_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_order_line`
  MODIFY `PK_toolbox_order_line_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_position`
  MODIFY `PK_toolbox_position_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_project`
  MODIFY `PK_toolbox_project_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_project_status`
  MODIFY `PK_toolbox_project_status_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_project_team`
  MODIFY `PK_toolbox_project_team_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_project_type`
  MODIFY `PK_toolbox_project_type_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_provider`
  MODIFY `PK_toolbox_provider_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_provider_category`
  MODIFY `PK_toolbox_provider_category_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_provider_contact`
  MODIFY `PK_toolbox_provider_contact_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_provider_countries`
  MODIFY `PK_toolbox_provider_countries_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_provider_note`
  MODIFY `PK_toolbox_provider_note_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_provider_type`
  MODIFY `PK_toolbox_provider_type_id` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `toolbox_update`
  MODIFY `PK_toolbox_update_id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
