-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 06, 2025 at 02:06 PM
-- Server version: 8.0.43
-- PHP Version: 8.4.11

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";




DROP TABLE IF EXISTS `absenceetudiant`;
CREATE TABLE `absenceetudiant` (
  `absetud_id` int NOT NULL,
  `absetud_date` date NOT NULL,
  `absetud_type` int NOT NULL,
  `absetud_ins_id` int NOT NULL,
  `absetud_seance_id` int NOT NULL,
  `absetud_justif` varchar(100) DEFAULT NULL,
  `absetud_duree` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `absenceprof`
--

DROP TABLE IF EXISTS `absenceprof`;
CREATE TABLE `absenceprof` (
  `absprof_id` int NOT NULL,
  `absprof_date` date NOT NULL,
  `absprof_prof_id` int NOT NULL,
  `absprof_seance_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `accueil`
--

DROP TABLE IF EXISTS `accueil`;
CREATE TABLE `accueil` (
  `acc_id` int NOT NULL,
  `acc_date_ajout` datetime NOT NULL,
  `acc_date` date NOT NULL,
  `acc_nom` varchar(100) NOT NULL,
  `acc_prenom` varchar(100) NOT NULL,
  `acc_adress` text NOT NULL,
  `acc_tel` varchar(20) NOT NULL,
  `acc_email` varchar(250) NOT NULL,
  `acc_diplome` varchar(250) NOT NULL,
  `acc_specialite` varchar(250) NOT NULL,
  `acc_annee_obtention` varchar(9) NOT NULL,
  `acc_activite_actuel` varchar(250) NOT NULL,
  `acc_connu_ecole` varchar(250) NOT NULL,
  `acc_remarques` text NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `anneescolaire`
--

DROP TABLE IF EXISTS `anneescolaire`;
CREATE TABLE `anneescolaire` (
  `annee_id` int UNSIGNED NOT NULL,
  `annee_nom` varchar(30) NOT NULL,
  `annee_datedeb` date NOT NULL,
  `annee_datefin` date NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `attachement`
--

DROP TABLE IF EXISTS `attachement`;
CREATE TABLE `attachement` (
  `att_id` int NOT NULL,
  `att_ext` varchar(3) NOT NULL,
  `att_taille` varchar(25) NOT NULL,
  `att_url` varchar(100) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `attestation`
--

DROP TABLE IF EXISTS `attestation`;
CREATE TABLE `attestation` (
  `id` int UNSIGNED NOT NULL,
  `nom` varchar(30) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `attestation_generer`
--

DROP TABLE IF EXISTS `attestation_generer`;
CREATE TABLE `attestation_generer` (
  `id` int UNSIGNED NOT NULL,
  `attes_code` varchar(200) NOT NULL,
  `date_generation` bigint NOT NULL,
  `ins_id` int UNSIGNED NOT NULL,
  `attestation_id` int UNSIGNED NOT NULL,
  `attes_deleted` tinyint NOT NULL DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `backup_resultat_exam`
--

DROP TABLE IF EXISTS `backup_resultat_exam`;
CREATE TABLE `backup_resultat_exam` (
  `bk_id` int NOT NULL,
  `bk_exam_id` int NOT NULL,
  `bk_type_exam` int DEFAULT NULL,
  `bk_ins_id` int DEFAULT NULL,
  `bk_emo_id` int DEFAULT NULL,
  `bk_note` decimal(20,2) DEFAULT NULL,
  `bk_details` char(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `bk_date` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `banques`
--

DROP TABLE IF EXISTS `banques`;
CREATE TABLE `banques` (
  `bnk_id` int NOT NULL,
  `bnk_nom` varchar(50) NOT NULL,
  `bnk_nom_ar` varchar(50) DEFAULT NULL,
  `bnk_code` int NOT NULL,
  `bnk_description` varchar(300) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `campagne`
--

DROP TABLE IF EXISTS `campagne`;
CREATE TABLE `campagne` (
  `camp_id` int UNSIGNED NOT NULL,
  `camp_nom` varchar(60) NOT NULL,
  `camp_date_debut` date DEFAULT NULL,
  `camp_date_fin` date DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `centre`
--

DROP TABLE IF EXISTS `centre`;
CREATE TABLE `centre` (
  `ct_id` int UNSIGNED NOT NULL,
  `ct_nom` varchar(80) NOT NULL,
  `ct_nat_id` int UNSIGNED DEFAULT NULL,
  `ct_ville_id` int UNSIGNED DEFAULT NULL,
  `ct_code` varchar(5) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `classe`
--

DROP TABLE IF EXISTS `classe`;
CREATE TABLE `classe` (
  `classe_id` int UNSIGNED NOT NULL,
  `classe_nom` varchar(100) DEFAULT NULL,
  `classe_visible` tinyint(1) DEFAULT '1',
  `classe_formation_id` int UNSIGNED NOT NULL,
  `classe_abbr` varchar(50) NOT NULL DEFAULT '',
  `classe_nom_court` varchar(200) NOT NULL DEFAULT '',
  `classe_nom_complet` varchar(300) NOT NULL DEFAULT '',
  `classe_niveau_filiere` int UNSIGNED NOT NULL DEFAULT '0',
  `classe_niveau_apresbac` int UNSIGNED DEFAULT NULL,
  `classe_asdebut` int UNSIGNED DEFAULT NULL,
  `classe_asfin` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `classe_cohort`
--

DROP TABLE IF EXISTS `classe_cohort`;
CREATE TABLE `classe_cohort` (
  `id` int NOT NULL,
  `classe_id` int NOT NULL,
  `mode_id` int DEFAULT NULL,
  `cohort_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `classe_typereleve`
--

DROP TABLE IF EXISTS `classe_typereleve`;
CREATE TABLE `classe_typereleve` (
  `id` int NOT NULL,
  `classe_id` int NOT NULL,
  `typereleve_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `ctr`
--

DROP TABLE IF EXISTS `ctr`;
CREATE TABLE `ctr` (
  `ctr_id` int NOT NULL,
  `ctr_num` varchar(2) DEFAULT NULL,
  `ctr_coeff` int DEFAULT NULL,
  `ctr_classe_id` int NOT NULL,
  `ctr_sess_id` int NOT NULL,
  `ctr_annee_id` int NOT NULL,
  `ctr_typectr_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `ctrmm`
--

DROP TABLE IF EXISTS `ctrmm`;
CREATE TABLE `ctrmm` (
  `ctrmm_id` int NOT NULL,
  `ctrmm_ctr_id` int NOT NULL,
  `ctrmm_mm_id` int NOT NULL,
  `ctrmm_date` date DEFAULT NULL,
  `ctrmm_annee_scolaire_id` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `demande`
--

DROP TABLE IF EXISTS `demande`;
CREATE TABLE `demande` (
  `demande_id` int NOT NULL,
  `demande_nom` varchar(40) NOT NULL,
  `demande_selected` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'This will be used to determin whether to display the item to student or not during document request process',
  `demande_fois` tinyint(1) DEFAULT NULL COMMENT 'How many time can student request this document',
  `demande_signe_pos` varchar(30) DEFAULT NULL,
  `demande_skeleton_file` varchar(50) DEFAULT NULL,
  `demande_page_param` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `demande_statut`
--

DROP TABLE IF EXISTS `demande_statut`;
CREATE TABLE `demande_statut` (
  `ds_id` int NOT NULL,
  `ds_nom` varchar(20) NOT NULL,
  `ds_label` varchar(20) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `departement`
--

DROP TABLE IF EXISTS `departement`;
CREATE TABLE `departement` (
  `depart_id` int NOT NULL,
  `depart_nom` varchar(100) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `departement_classe`
--

DROP TABLE IF EXISTS `departement_classe`;
CREATE TABLE `departement_classe` (
  `departclasse_id` int NOT NULL,
  `departclasse_depart_id` int NOT NULL,
  `departclasse_classe_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `depense`
--

DROP TABLE IF EXISTS `depense`;
CREATE TABLE `depense` (
  `depense_id` int NOT NULL,
  `depense_num` varchar(7) NOT NULL,
  `depense_type` int NOT NULL,
  `depense_date` date NOT NULL,
  `depense_ben_id` int NOT NULL,
  `depense_dep_ref_id` int NOT NULL,
  `depense_montant` decimal(10,2) NOT NULL,
  `depense_desc` text NOT NULL,
  `depense_methpay` int NOT NULL,
  `depense_methpay_num` varchar(50) DEFAULT NULL,
  `depense_methpay_date` date DEFAULT NULL,
  `depense_att_1` varchar(250) DEFAULT NULL,
  `depense_att_2` varchar(250) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `depenses`
--

DROP TABLE IF EXISTS `depenses`;
CREATE TABLE `depenses` (
  `id` bigint NOT NULL,
  `name` varchar(50) NOT NULL,
  `supplier_id` bigint NOT NULL,
  `amount` decimal(6,2) NOT NULL,
  `depense_date` date NOT NULL,
  `invoice` varchar(15) NOT NULL,
  `nature` varchar(50) NOT NULL,
  `type` varchar(10) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `depense_details`
--

DROP TABLE IF EXISTS `depense_details`;
CREATE TABLE `depense_details` (
  `id` bigint NOT NULL,
  `depense_id` bigint NOT NULL,
  `amount` varchar(50) NOT NULL,
  `depense_detail_date` date NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `dep_ben`
--

DROP TABLE IF EXISTS `dep_ben`;
CREATE TABLE `dep_ben` (
  `db_id` int NOT NULL,
  `db_type` int NOT NULL,
  `db_nom` varchar(250) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `dep_log`
--

DROP TABLE IF EXISTS `dep_log`;
CREATE TABLE `dep_log` (
  `dl_id` int NOT NULL,
  `dl_dep_id` int NOT NULL,
  `dl_admin_id` int NOT NULL,
  `dl_date_ajout` datetime NOT NULL,
  `dl_desc` text NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `dep_ref`
--

DROP TABLE IF EXISTS `dep_ref`;
CREATE TABLE `dep_ref` (
  `dep_ref_id` int NOT NULL,
  `dep_ref_nom` varchar(100) NOT NULL
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `destinataire_sms`
--

DROP TABLE IF EXISTS `destinataire_sms`;
CREATE TABLE `destinataire_sms` (
  `ds_id` int NOT NULL,
  `ds_sms_id` int NOT NULL,
  `ds_user_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `details_calendrier_pedagogique`
--

DROP TABLE IF EXISTS `details_calendrier_pedagogique`;
CREATE TABLE `details_calendrier_pedagogique` (
  `Det_id` int UNSIGNED NOT NULL,
  `Det_niveau` int UNSIGNED NOT NULL,
  `Det_label` varchar(255) NOT NULL,
  `Det_date_debut` date NOT NULL,
  `Det_date_fin` date NOT NULL,
  `Det_calendrier_id` int UNSIGNED NOT NULL,
  `Det_details_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `devoir`
--

DROP TABLE IF EXISTS `devoir`;
CREATE TABLE `devoir` (
  `dev_id` int NOT NULL,
  `dev_titre` varchar(100) NOT NULL,
  `dev_description` text NOT NULL,
  `dev_date_debut` date NOT NULL,
  `dev_date_fin` datetime NOT NULL,
  `dev_fichier_url` varchar(100) NOT NULL,
  `dev_classe_id` int NOT NULL,
  `dev_prof_id` int NOT NULL,
  `dev_seance_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `devoiretud`
--

DROP TABLE IF EXISTS `devoiretud`;
CREATE TABLE `devoiretud` (
  `devetud_id` int NOT NULL,
  `devetud_dev_id` int NOT NULL,
  `devetud_ins_id` int NOT NULL,
  `devetud_date` datetime NOT NULL,
  `devetud_fichier_url` varchar(100) NOT NULL,
  `devetud_note` decimal(10,2) DEFAULT NULL,
  `devetud_remarque` text NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `direction`
--

DROP TABLE IF EXISTS `direction`;
CREATE TABLE `direction` (
  `dir_id` int NOT NULL,
  `dir_nom` varchar(50) NOT NULL,
  `dir_prenom` varchar(50) NOT NULL,
  `dir_sexe` char(1) NOT NULL,
  `dir_cin` varchar(20) DEFAULT NULL,
  `dir_datenaiss` date DEFAULT NULL,
  `dir_lieunaiss` varchar(50) DEFAULT NULL,
  `dir_adresse` varchar(200) DEFAULT NULL,
  `dir_ville_id` int UNSIGNED DEFAULT NULL,
  `dir_email` varchar(100) DEFAULT NULL,
  `dir_tel` varchar(50) DEFAULT NULL,
  `dir_user_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `emploitemps`
--

DROP TABLE IF EXISTS `emploitemps`;
CREATE TABLE `emploitemps` (
  `emploi_id` int NOT NULL,
  `emploi_classe_id` int NOT NULL,
  `emploi_annee_id` int NOT NULL,
  `emploi_sess_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `etudiant`
--

DROP TABLE IF EXISTS `etudiant`;
CREATE TABLE `etudiant` (
  `etud_id` int NOT NULL,
  `etud_nom` varchar(50) NOT NULL,
  `etud_prenom` varchar(50) NOT NULL,
  `etud_nom_ar` varchar(50) DEFAULT NULL,
  `etud_prenom_ar` varchar(50) DEFAULT NULL,
  `etud_sexe` char(1) NOT NULL,
  `etud_cin` varchar(20) DEFAULT NULL,
  `etud_datenaiss` date DEFAULT NULL,
  `etud_lieunaiss` varchar(50) DEFAULT NULL,
  `etud_lieunaiss_ar` varchar(50) DEFAULT NULL,
  `etud_adresse` varchar(200) DEFAULT NULL,
  `etud_ville_id` int DEFAULT NULL,
  `etud_nat_id` int NOT NULL,
  `etud_email` varchar(100) DEFAULT NULL,
  `etud_tel` varchar(50) DEFAULT NULL,
  `etud_bac_id` int DEFAULT NULL,
  `etud_serie_bac` varchar(50) DEFAULT NULL,
  `etud_centre_id` int NOT NULL DEFAULT '1',
  `etud_abandonne` tinyint(1) DEFAULT '0',
  `etud_status` tinyint(1) DEFAULT '0',
  `a_decalage` tinyint(1) DEFAULT '0',
  `etud_dec` tinyint(1) DEFAULT '0',
  `etud_valide` tinyint(1) DEFAULT '1',
  `etud_dossier_complet` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `etudiants_option`
--

DROP TABLE IF EXISTS `etudiants_option`;
CREATE TABLE `etudiants_option` (
  `etudopt_id` int NOT NULL,
  `etudopt_option` varchar(200) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `etudiant_document`
--

DROP TABLE IF EXISTS `etudiant_document`;
CREATE TABLE `etudiant_document` (
  `id` int NOT NULL,
  `etud_id` int NOT NULL,
  `doc_id` int NOT NULL,
  `doc_date_submit` bigint DEFAULT NULL,
  `doc_source` varchar(200) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `doc_notice` mediumtext CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `doc_accept` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `etudiant_inscription`
--

DROP TABLE IF EXISTS `etudiant_inscription`;
CREATE TABLE `etudiant_inscription` (
  `ins_id` int NOT NULL,
  `ins_date` date DEFAULT NULL,
  `ins_numero` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `ins_etud_id` int NOT NULL,
  `ins_classe_id` int NOT NULL,
  `ins_annee_id` int NOT NULL,
  `ins_typeformation` int DEFAULT NULL,
  `ins_form_der_id` int DEFAULT '1',
  `ins_statut` int NOT NULL,
  `ins_valide` int NOT NULL DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `etudiant_mdluser`
--

DROP TABLE IF EXISTS `etudiant_mdluser`;
CREATE TABLE `etudiant_mdluser` (
  `id` int NOT NULL,
  `etud_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `bloqued` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `etudiant_tag`
--

DROP TABLE IF EXISTS `etudiant_tag`;
CREATE TABLE `etudiant_tag` (
  `tag_id` int DEFAULT NULL,
  `etud_id` int DEFAULT NULL,
  `user_ref` int DEFAULT NULL
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `etud_abs`
--

DROP TABLE IF EXISTS `etud_abs`;
CREATE TABLE `etud_abs` (
  `absetud_id` int NOT NULL,
  `absetud_date` date NOT NULL,
  `absetud_type` int NOT NULL,
  `absetud_ins_id` int NOT NULL,
  `absetud_seance_id` int NOT NULL,
  `absetud_justif` varchar(100) DEFAULT NULL,
  `absetud_duree` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `etud_log`
--

DROP TABLE IF EXISTS `etud_log`;
CREATE TABLE `etud_log` (
  `el_id` int NOT NULL,
  `el_etud_id` int NOT NULL,
  `el_admin_id` int NOT NULL,
  `el_date_ajout` datetime NOT NULL,
  `el_log` text NOT NULL
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `etud_obs`
--

DROP TABLE IF EXISTS `etud_obs`;
CREATE TABLE `etud_obs` (
  `id` int NOT NULL,
  `etud_id` int DEFAULT NULL,
  `obs_id` int DEFAULT NULL,
  `status` tinyint DEFAULT '0'
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `etud_piece`
--

DROP TABLE IF EXISTS `etud_piece`;
CREATE TABLE `etud_piece` (
  `etud_id` int NOT NULL,
  `piece_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `etud_remarque`
--

DROP TABLE IF EXISTS `etud_remarque`;
CREATE TABLE `etud_remarque` (
  `er_id` int NOT NULL,
  `er_etud_id` int NOT NULL,
  `er_admin_id` int NOT NULL,
  `er_date_ajout` datetime NOT NULL,
  `er_remarque` text NOT NULL
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `evenement`
--

DROP TABLE IF EXISTS `evenement`;
CREATE TABLE `evenement` (
  `even_id` int NOT NULL,
  `even_date_debut` datetime NOT NULL,
  `even_date_fin` datetime DEFAULT NULL,
  `even_text` mediumtext NOT NULL,
  `even_user_ref_id` int NOT NULL
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `fiche`
--

DROP TABLE IF EXISTS `fiche`;
CREATE TABLE `fiche` (
  `fiche_id` int NOT NULL,
  `fiche_nom` varchar(50) NOT NULL,
  `fiche_modal_nom` varchar(30) NOT NULL
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `file_upload_permessions`
--

DROP TABLE IF EXISTS `file_upload_permessions`;
CREATE TABLE `file_upload_permessions` (
  `id` int NOT NULL,
  `filiere_id` int DEFAULT NULL,
  `classe` int DEFAULT NULL,
  `annee_scolaire_id` int DEFAULT NULL,
  `upload_date` datetime DEFAULT NULL,
  `permission` int DEFAULT '1'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `filiere`
--

DROP TABLE IF EXISTS `filiere`;
CREATE TABLE `filiere` (
  `fil_id` int UNSIGNED NOT NULL,
  `fil_nom` varchar(100) NOT NULL DEFAULT '',
  `fil_nom_ar` varchar(200) DEFAULT NULL,
  `fil_abbr` varchar(20) NOT NULL DEFAULT '',
  `fil_dom_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `filiere_bac`
--

DROP TABLE IF EXISTS `filiere_bac`;
CREATE TABLE `filiere_bac` (
  `id` int UNSIGNED NOT NULL,
  `bac_id` int UNSIGNED DEFAULT NULL,
  `filiere_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `formation_deroulement`
--

DROP TABLE IF EXISTS `formation_deroulement`;
CREATE TABLE `formation_deroulement` (
  `form_der_id` int NOT NULL,
  `form_der_type` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `form_short` varchar(3) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `form_select` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `garant_financiere`
--

DROP TABLE IF EXISTS `garant_financiere`;
CREATE TABLE `garant_financiere` (
  `id` int UNSIGNED NOT NULL,
  `nom` varchar(60) DEFAULT NULL,
  `tel` varchar(30) DEFAULT NULL,
  `visiteur_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `groupes`
--

DROP TABLE IF EXISTS `groupes`;
CREATE TABLE `groupes` (
  `grp_id` int UNSIGNED NOT NULL,
  `grp_nom` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `grp_period` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `historique_log`
--

DROP TABLE IF EXISTS `historique_log`;
CREATE TABLE `historique_log` (
  `log_id` int NOT NULL,
  `log_text` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `log_date` datetime DEFAULT CURRENT_TIMESTAMP,
  `log_utilisateur_id` int DEFAULT NULL
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `inscription`
--

DROP TABLE IF EXISTS `inscription`;
CREATE TABLE `inscription` (
  `ins_id` int NOT NULL,
  `ins_date` date NOT NULL,
  `ins_seq` int UNSIGNED DEFAULT '0',
  `ins_numero` varchar(20) DEFAULT NULL,
  `ins_etud_id` int NOT NULL,
  `ins_classe_id` int NOT NULL,
  `ins_annee_id` int NOT NULL,
  `ins_typeformation` int DEFAULT NULL,
  `ins_statut` int NOT NULL,
  `ins_form_der_id` int DEFAULT '1',
  `ins_abond` tinyint(1) NOT NULL DEFAULT '0',
  `ins_valide` int NOT NULL DEFAULT '0',
  `ins_dec` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB ;

-- --------------------------------------------------------

--
-- Table structure for table `inscription_demande`
--

DROP TABLE IF EXISTS `inscription_demande`;
CREATE TABLE `inscription_demande` (
  `insdem_id` int NOT NULL,
  `insdem_ins_id` int NOT NULL,
  `insdem_demande_id` int NOT NULL,
  `insdem_date` datetime NOT NULL,
  `insdem_tirer` tinyint NOT NULL DEFAULT '0',
  `insdem_paiement_statut` tinyint(1) DEFAULT '0',
  `insdem_dossier_statut` tinyint(1) DEFAULT '0',
  `insdem_prete` tinyint(1) DEFAULT '0',
  `insdem_prete_date` date DEFAULT NULL,
  `insdem_livre` tinyint(1) NOT NULL DEFAULT '0',
  `insdem_livre_date` datetime DEFAULT NULL,
  `insdem_annuler` tinyint(1) DEFAULT '0',
  `insdem_raison` mediumtext CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `insdem_actual` tinyint(1) DEFAULT '0',
  `user_id` tinyint UNSIGNED DEFAULT '0',
  `demande_statut_id` int DEFAULT '1'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `inscription_demande_remarque`
--

DROP TABLE IF EXISTS `inscription_demande_remarque`;
CREATE TABLE `inscription_demande_remarque` (
  `id` int NOT NULL,
  `remarque` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `user` int NOT NULL,
  `insc_demande_id` int NOT NULL,
  `date_remarque` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `deleted` tinyint NOT NULL DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `inscription_document`
--

DROP TABLE IF EXISTS `inscription_document`;
CREATE TABLE `inscription_document` (
  `id` int NOT NULL,
  `ins_id` int NOT NULL,
  `doc_id` int NOT NULL,
  `doc_date_submit` bigint DEFAULT NULL,
  `doc_source` varchar(200) DEFAULT NULL,
  `doc_notice` mediumtext,
  `doc_accept` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `inscription_option`
--

DROP TABLE IF EXISTS `inscription_option`;
CREATE TABLE `inscription_option` (
  `id` int NOT NULL,
  `nom` varchar(100) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `inscription_tag`
--

DROP TABLE IF EXISTS `inscription_tag`;
CREATE TABLE `inscription_tag` (
  `id` int UNSIGNED NOT NULL,
  `inscription_id` int UNSIGNED DEFAULT NULL,
  `tag_id` int UNSIGNED DEFAULT NULL,
  `user_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `langue_niveau`
--

DROP TABLE IF EXISTS `langue_niveau`;
CREATE TABLE `langue_niveau` (
  `id` int UNSIGNED NOT NULL,
  `langue_nom` varchar(20) NOT NULL,
  `niveau` varchar(30) NOT NULL,
  `ins_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `mail`
--

DROP TABLE IF EXISTS `mail`;
CREATE TABLE `mail` (
  `mail_id` int NOT NULL,
  `mail_sender_id` int NOT NULL,
  `mail_receiver_id` int NOT NULL,
  `mail_objet` varchar(50) NOT NULL,
  `mail_message` text NOT NULL,
  `mail_date_envoi` datetime NOT NULL,
  `mail_etat` int NOT NULL,
  `mail_trash` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `mailatt`
--

DROP TABLE IF EXISTS `mailatt`;
CREATE TABLE `mailatt` (
  `mailatt_id` int NOT NULL,
  `mailatt_mail_id` int NOT NULL,
  `mailatt_att_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `matiere`
--

DROP TABLE IF EXISTS `matiere`;
CREATE TABLE `matiere` (
  `mat_id` int NOT NULL,
  `mat_nom` varchar(100) NOT NULL,
  `mat_classe_id` int DEFAULT NULL,
  `mat_semestre_id` int DEFAULT NULL,
  `mat_dependent` tinyint(1) NOT NULL DEFAULT '0',
  `is_module` int DEFAULT NULL,
  `mat_annee_id` int DEFAULT NULL,
  `mat_visible` tinyint(1) DEFAULT '1',
  `mat_pfe` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `menu`
--

DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
  `id` int NOT NULL,
  `nom` varchar(200) NOT NULL,
  `url` varchar(200) NOT NULL,
  `icon` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `methodepayement`
--

DROP TABLE IF EXISTS `methodepayement`;
CREATE TABLE `methodepayement` (
  `methpay_id` int UNSIGNED NOT NULL,
  `methpay_nom` varchar(50) NOT NULL,
  `methpay_opt` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `modmat`
--

DROP TABLE IF EXISTS `modmat`;
CREATE TABLE `modmat` (
  `mm_id` int NOT NULL,
  `mm_mod_id` int NOT NULL,
  `mm_mat_id` int NOT NULL,
  `mm_coef` decimal(3,1) DEFAULT NULL,
  `mm_session_id` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `module`
--

DROP TABLE IF EXISTS `module`;
CREATE TABLE `module` (
  `mod_id` int NOT NULL,
  `mod_code` varchar(10) DEFAULT NULL,
  `mod_nom` varchar(100) NOT NULL,
  `mod_coef` int DEFAULT NULL,
  `mod_filiere_id` int NOT NULL,
  `mod_typeformation_id` int NOT NULL,
  `mod_annee_id` int DEFAULT NULL,
  `mod_visible` tinyint(1) DEFAULT '1'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `mois`
--

DROP TABLE IF EXISTS `mois`;
CREATE TABLE `mois` (
  `mois_id` int NOT NULL,
  `mois_nom` varchar(20) NOT NULL,
  `mois_code` int NOT NULL,
  `mois_ordre` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `moyenne_emo`
--

DROP TABLE IF EXISTS `moyenne_emo`;
CREATE TABLE `moyenne_emo` (
  `moy_id` int NOT NULL,
  `moy_emo` int DEFAULT NULL,
  `moy_ins_id` int DEFAULT NULL,
  `moy_note` float DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `nationalite`
--

DROP TABLE IF EXISTS `nationalite`;
CREATE TABLE `nationalite` (
  `nat_id` int UNSIGNED NOT NULL,
  `nat_nom` varchar(40) NOT NULL,
  `nat_arab` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `niveau`
--

DROP TABLE IF EXISTS `niveau`;
CREATE TABLE `niveau` (
  `niv_id` int DEFAULT NULL,
  `niv_nom` varchar(15) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `notde`
--

DROP TABLE IF EXISTS `notde`;
CREATE TABLE `notde` (
  `notde_id` int NOT NULL,
  `notde_not_id` int NOT NULL,
  `notde_user_id` int NOT NULL,
  `notde_etat` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `note`
--

DROP TABLE IF EXISTS `note`;
CREATE TABLE `note` (
  `note_id` int NOT NULL,
  `note_note` decimal(10,2) DEFAULT NULL,
  `note_commentaire` mediumtext,
  `note_ctrmm_id` int NOT NULL,
  `note_ins_id` int NOT NULL,
  `note_ratrapage` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `notep`
--

DROP TABLE IF EXISTS `notep`;
CREATE TABLE `notep` (
  `note_id` int NOT NULL,
  `note_note` decimal(10,2) DEFAULT NULL,
  `note_commentaire` mediumtext,
  `note_ctrmm_id` int NOT NULL,
  `note_ins_id` int NOT NULL,
  `note_ratrapage` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `notifications`
--

DROP TABLE IF EXISTS `notifications`;
CREATE TABLE `notifications` (
  `not_id` int UNSIGNED NOT NULL,
  `not_date_ajout` datetime NOT NULL,
  `not_sdesc` varchar(30) NOT NULL,
  `not_desc` varchar(1000) NOT NULL DEFAULT '',
  `not_vu` int NOT NULL,
  `not_vu_index` int NOT NULL,
  `not_icon` varchar(20) NOT NULL,
  `not_label` varchar(10) NOT NULL,
  `not_user_id` int UNSIGNED DEFAULT NULL,
  `not_role_id` int UNSIGNED DEFAULT NULL COMMENT 'either is being sent to admin or group of users based on value inserted'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_absences`
--

DROP TABLE IF EXISTS `n_absences`;
CREATE TABLE `n_absences` (
  `abs_id` int UNSIGNED NOT NULL,
  `abs_seance_id` int UNSIGNED NOT NULL,
  `abs_uet_id` int UNSIGNED NOT NULL,
  `abs_ins_id` int UNSIGNED NOT NULL,
  `abs_type` enum('A','R') NOT NULL COMMENT 'Absence, Retard',
  `abs_est_justifie` int UNSIGNED DEFAULT NULL,
  `abs_duree_retard` int UNSIGNED DEFAULT NULL,
  `abs_justificatif` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `abs_modif_par` int DEFAULT NULL,
  `abs_date_modif` datetime DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_admissions`
--

DROP TABLE IF EXISTS `n_admissions`;
CREATE TABLE `n_admissions` (
  `adm_id` int UNSIGNED NOT NULL,
  `adm_date` date NOT NULL,
  `adm_seq` int UNSIGNED DEFAULT NULL,
  `adm_numero` varchar(20) NOT NULL,
  `adm_type` enum('M','S') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT 'M',
  `adm_supmti_id` int UNSIGNED DEFAULT NULL,
  `adm_etudiant_id` int UNSIGNED NOT NULL,
  `adm_formation_id` int UNSIGNED NOT NULL,
  `adm_centre_id` int UNSIGNED NOT NULL,
  `adm_centre_admin_id` int UNSIGNED DEFAULT NULL,
  `adm_as_id` int UNSIGNED NOT NULL,
  `adm_preins_id` int UNSIGNED DEFAULT NULL,
  `adm_cne` varchar(20) DEFAULT NULL,
  `adm_cni` varchar(20) DEFAULT NULL,
  `adm_passport` varchar(20) DEFAULT NULL,
  `adm_cejour_date_exp` date DEFAULT NULL,
  `adm_situation` enum('N','R','P') DEFAULT NULL,
  `adm_diplomeacces` varchar(100) DEFAULT NULL,
  `adm_seriebac` varchar(100) DEFAULT NULL,
  `adm_anneebac` varchar(20) DEFAULT NULL,
  `adm_specialitebac` varchar(100) DEFAULT NULL,
  `adm_mentionbac` varchar(20) DEFAULT NULL,
  `adm_lieubac` varchar(100) DEFAULT NULL,
  `adm_premiereannee` varchar(20) DEFAULT NULL,
  `adm_handicape` enum('N','A','M','V','AM','AV','MV','T','XX') DEFAULT NULL,
  `adm_resident` enum('O','N') DEFAULT NULL,
  `adm_fonctionnaire` enum('O','N') DEFAULT NULL,
  `adm_bourse` decimal(20,2) DEFAULT NULL,
  `adm_mobilite` enum('O','N') DEFAULT NULL,
  `adm_documentsfournis` varchar(500) DEFAULT NULL,
  `adm_afournir` varchar(500) DEFAULT NULL,
  `adm_accordpeda` enum('V','O','R') DEFAULT NULL,
  `adm_commentairepeda` varchar(200) DEFAULT NULL,
  `adm_accordadmin` enum('V','O','R') DEFAULT NULL,
  `adm_commentaireadmin` varchar(200) DEFAULT NULL,
  `adm_statut_id` int UNSIGNED NOT NULL DEFAULT '1',
  `adm_mise_a_niveau` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `adm_dossier_accept_chemin` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `adm_est_principale` tinyint DEFAULT '0',
  `adm_mode` enum('P','H') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `adm_localite_id` int UNSIGNED DEFAULT NULL,
  `adm_ns_diplome` int UNSIGNED DEFAULT NULL,
  `adm_site_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_admission_diplome`
--

DROP TABLE IF EXISTS `n_admission_diplome`;
CREATE TABLE `n_admission_diplome` (
  `dip_id` int NOT NULL,
  `dip_adm_id` int UNSIGNED NOT NULL,
  `dip_annee_id` int UNSIGNED NOT NULL,
  `dip_numero` int NOT NULL,
  `dip_releves_livres` tinyint DEFAULT '0',
  `dip_livre` tinyint DEFAULT '0',
  `dip_date` datetime DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_admission_miseaniveau`
--

DROP TABLE IF EXISTS `n_admission_miseaniveau`;
CREATE TABLE `n_admission_miseaniveau` (
  `am_id` int UNSIGNED NOT NULL,
  `am_adm_id` int UNSIGNED NOT NULL,
  `am_modules` varchar(200) NOT NULL DEFAULT '',
  `am_duree` varchar(100) NOT NULL,
  `am_appreciation` varchar(200) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_batch`
--

DROP TABLE IF EXISTS `n_batch`;
CREATE TABLE `n_batch` (
  `bat_id` int NOT NULL,
  `bat_desc` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `bat_criteres` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT 'Data to be used when running the job',
  `bat_date_prog` datetime NOT NULL,
  `bat_date_exec` datetime DEFAULT NULL,
  `bat_date_fin_exec` datetime DEFAULT NULL,
  `bat_statut` enum('N','E','S','R') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'N' COMMENT '''N : Pas encore'' , ''E : encours'', ''S : success'', ''R : error''',
  `bat_nbr_exec` int UNSIGNED DEFAULT '0',
  `bat_job_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_budgets`
--

DROP TABLE IF EXISTS `n_budgets`;
CREATE TABLE `n_budgets` (
  `bud_id` int UNSIGNED NOT NULL,
  `bud_libelle` varchar(300) NOT NULL,
  `bud_as_id` int UNSIGNED NOT NULL,
  `bud_centre_id` int UNSIGNED NOT NULL,
  `bud_definitif` tinyint UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_cahier_text`
--

DROP TABLE IF EXISTS `n_cahier_text`;
CREATE TABLE `n_cahier_text` (
  `cht_id` int NOT NULL,
  `cht_seance_id` int UNSIGNED NOT NULL,
  `cht_objectif` varchar(400) NOT NULL,
  `cht_descriptif` varchar(250) DEFAULT NULL,
  `cht_observations` varchar(250) DEFAULT NULL,
  `cht_disposition` varchar(400) DEFAULT NULL,
  `cht_nbr_heures` varchar(50) NOT NULL,
  `cht_signature` varchar(250) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_calendrier_pedagogiques`
--

DROP TABLE IF EXISTS `n_calendrier_pedagogiques`;
CREATE TABLE `n_calendrier_pedagogiques` (
  `cal_id` int NOT NULL,
  `cal_annee_scolaire` int NOT NULL,
  `cal_centre` int NOT NULL,
  `cal_session` int NOT NULL,
  `cal_label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_centre_formations`
--

DROP TABLE IF EXISTS `n_centre_formations`;
CREATE TABLE `n_centre_formations` (
  `cfm_id` int UNSIGNED NOT NULL,
  `cfm_centre_id` int UNSIGNED NOT NULL,
  `cfm_for_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_centre_param`
--

DROP TABLE IF EXISTS `n_centre_param`;
CREATE TABLE `n_centre_param` (
  `cp_id` int NOT NULL,
  `cp_centre_id` int UNSIGNED NOT NULL,
  `cp_logo_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'URL du logo du centre',
  `cp_reçu_footer_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `cp_langue_principale` enum('FR','AR','EN') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'FR' COMMENT 'Langue principale de l''interface',
  `cp_couleur_principale` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Couleur principale utilisée',
  `cp_couleur_secondaire` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Couleur secondaire utilisée',
  `cp_police` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Font family'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_comptes_societe`
--

DROP TABLE IF EXISTS `n_comptes_societe`;
CREATE TABLE `n_comptes_societe` (
  `cs_id` int UNSIGNED NOT NULL,
  `cs_numero` varchar(22) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `cs_rib` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `cs_agence` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `cs_banque_id` int UNSIGNED NOT NULL,
  `cs_ville_id` int UNSIGNED NOT NULL,
  `cs_centre_id` int UNSIGNED NOT NULL,
  `cs_principal` enum('O','N') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'N'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_criteres_access`
--

DROP TABLE IF EXISTS `n_criteres_access`;
CREATE TABLE `n_criteres_access` (
  `ca_id` int UNSIGNED NOT NULL,
  `ca_nom` varchar(500) NOT NULL,
  `ca_libelle` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `ca_abbr` varchar(50) NOT NULL,
  `ca_index` char(2) NOT NULL DEFAULT '',
  `ca_visibilite` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'visible pour l''étudiant',
  `ca_est_imprime` tinyint(1) NOT NULL DEFAULT '1',
  `ca_estobligatoire` tinyint NOT NULL DEFAULT '0',
  `ca_niv_min` tinyint NOT NULL DEFAULT '0',
  `ca_niv_max` tinyint NOT NULL DEFAULT '0',
  `ca_scope` enum('T','E','M') NOT NULL COMMENT 'Indique à quelle nationalité est appliquée ce critère : T : Toute, E: Etrangère, M; Maricaine'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_deliberations`
--

DROP TABLE IF EXISTS `n_deliberations`;
CREATE TABLE `n_deliberations` (
  `del_id` int NOT NULL,
  `del_status` enum('P','F','C') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'P' COMMENT 'P: prevu , F:faite ,C:Confirmer',
  `del_classe_id` int DEFAULT NULL,
  `del_date_prevu` datetime DEFAULT NULL,
  `del_date_effectuer` timestamp NULL DEFAULT NULL,
  `del_commentaire` char(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `del_annee` int DEFAULT NULL,
  `del_semestre` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_demandes`
--

DROP TABLE IF EXISTS `n_demandes`;
CREATE TABLE `n_demandes` (
  `dem_id` int UNSIGNED NOT NULL,
  `dem_statut_id` int UNSIGNED NOT NULL DEFAULT '1',
  `dem_ins_id` int UNSIGNED NOT NULL,
  `dem_user_id` int UNSIGNED DEFAULT '0',
  `dem_createur_id` int UNSIGNED DEFAULT NULL,
  `dem_type_id` int UNSIGNED NOT NULL,
  `dem_type_recl_id` int UNSIGNED DEFAULT NULL,
  `dem_date_creation` datetime NOT NULL,
  `dem_objet` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dem_details` varchar(800) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dem_date_souhaitee` datetime DEFAULT NULL,
  `dem_date_prevision` datetime DEFAULT NULL,
  `dem_typedoc_id` int UNSIGNED DEFAULT NULL,
  `dem_modele_id` int UNSIGNED DEFAULT NULL,
  `dem_date_prise_encompte` datetime DEFAULT NULL,
  `dem_dispo` datetime DEFAULT NULL,
  `dem_livraison` datetime DEFAULT NULL,
  `dem_fichier` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dem_fichier_type` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dem_contenu` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `dem_rec_prove_chemin` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_demande_commentaires`
--

DROP TABLE IF EXISTS `n_demande_commentaires`;
CREATE TABLE `n_demande_commentaires` (
  `cd_id` int UNSIGNED NOT NULL,
  `cd_demande_id` int UNSIGNED NOT NULL,
  `cd_user_id` int UNSIGNED NOT NULL,
  `cd_date_creation` datetime NOT NULL,
  `cd_commentaire` varchar(1000) NOT NULL DEFAULT '',
  `cd_date_modification` datetime DEFAULT NULL,
  `cd_type` enum('I','P') DEFAULT NULL COMMENT 'I: Interne (visible uniquement pour le personnel de l''Admin), P: Public (visible pour les étudiants et Tuteurs)'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_diplomes`
--

DROP TABLE IF EXISTS `n_diplomes`;
CREATE TABLE `n_diplomes` (
  `dip_id` int UNSIGNED NOT NULL,
  `dip_nom` varchar(100) NOT NULL DEFAULT '',
  `dip_abbr` varchar(20) NOT NULL DEFAULT '',
  `dip_nbannees` int UNSIGNED NOT NULL DEFAULT '0',
  `dip_niveau_apresbac` int UNSIGNED NOT NULL DEFAULT '0',
  `dip_gd_id` int UNSIGNED NOT NULL DEFAULT '0' COMMENT 'groupement_diplomes'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_diplomes_acces`
--

DROP TABLE IF EXISTS `n_diplomes_acces`;
CREATE TABLE `n_diplomes_acces` (
  `da_id` int UNSIGNED NOT NULL,
  `da_preins_id` int UNSIGNED NOT NULL,
  `da_type_diplome_id` int UNSIGNED DEFAULT NULL,
  `da_specialite` varchar(300) DEFAULT NULL,
  `da_mention` varchar(20) DEFAULT NULL,
  `da_ville` varchar(50) DEFAULT NULL COMMENT 'this will be deleted( we will use a list of coutries instead)',
  `da_pays_id` int UNSIGNED DEFAULT NULL,
  `da_nom_etablissement` varchar(100) DEFAULT NULL,
  `da_ville_id` int UNSIGNED DEFAULT NULL,
  `da_type_etablissement` varchar(15) DEFAULT NULL,
  `da_annee` varchar(15) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_diplome_document`
--

DROP TABLE IF EXISTS `n_diplome_document`;
CREATE TABLE `n_diplome_document` (
  `dd_id` int NOT NULL,
  `dd_ca_id` int DEFAULT NULL,
  `dd_diplome_id` int DEFAULT NULL,
  `dd_diplome_access_id` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_domaines`
--

DROP TABLE IF EXISTS `n_domaines`;
CREATE TABLE `n_domaines` (
  `dom_id` int UNSIGNED NOT NULL,
  `dom_nom` varchar(100) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_edt`
--

DROP TABLE IF EXISTS `n_edt`;
CREATE TABLE `n_edt` (
  `edt_id` int UNSIGNED NOT NULL,
  `edt_classe_id` int UNSIGNED NOT NULL,
  `edt_as_id` int UNSIGNED NOT NULL,
  `edt_centre_id` int UNSIGNED DEFAULT NULL,
  `edt_sem_id` int UNSIGNED NOT NULL,
  `edt_type_id` int NOT NULL DEFAULT (0) COMMENT 'Cours, Exam',
  `edt_mode` enum('P','H') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'P' COMMENT 'Présentiel, Hybride',
  `edt_statut` enum('P','D') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Provisoire, Définitif',
  `edt_nom` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `edt_date_validite` date DEFAULT NULL,
  `edt_type_adm` enum('M','S') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'M',
  `edt_est_decale` tinyint DEFAULT '0',
  `edt_calender_id` int DEFAULT NULL,
  `edt_groupe` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_edt_unites`
--

DROP TABLE IF EXISTS `n_edt_unites`;
CREATE TABLE `n_edt_unites` (
  `uet_id` int UNSIGNED NOT NULL,
  `uet_edt_id` int UNSIGNED NOT NULL,
  `uet_salle_id` int UNSIGNED DEFAULT NULL,
  `uet_emo_id` int UNSIGNED NOT NULL,
  `uet_prof_id` int UNSIGNED NOT NULL,
  `uet_hdeb` time DEFAULT NULL,
  `uet_hfin` time DEFAULT NULL,
  `uet_duree` smallint DEFAULT NULL,
  `uet_jour` int UNSIGNED NOT NULL,
  `uet_date_deb` date NOT NULL,
  `uet_date_fin` date NOT NULL,
  `uet_groupe_id` int UNSIGNED DEFAULT NULL,
  `uet_remarque` tinytext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_elements_modules`
--

DROP TABLE IF EXISTS `n_elements_modules`;
CREATE TABLE `n_elements_modules` (
  `emo_id` int UNSIGNED NOT NULL,
  `emo_classe_id` int UNSIGNED NOT NULL,
  `emo_mod_id` int UNSIGNED DEFAULT NULL,
  `emo_mod_index` int NOT NULL,
  `emo_mat_id` int UNSIGNED NOT NULL,
  `emo_sem_id` int UNSIGNED DEFAULT NULL,
  `emo_prof_cours_id` int UNSIGNED DEFAULT NULL,
  `emo_prof_td_id` int UNSIGNED DEFAULT NULL,
  `emo_prof_p_id` int UNSIGNED DEFAULT NULL COMMENT 'Prof PrÃ©sentiel',
  `emo_prof_h_id` int UNSIGNED DEFAULT NULL COMMENT 'Prof Hybride',
  `emo_coef` decimal(20,2) UNSIGNED NOT NULL,
  `emo_nbheures` int UNSIGNED NOT NULL,
  `emo_type` enum('U.F','PFE','Stage','TI') NOT NULL,
  `emo_visible_pv` tinyint UNSIGNED DEFAULT '1',
  `emo_est_enseigne` tinyint UNSIGNED DEFAULT '1',
  `emo_last_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_encadrants_projets`
--

DROP TABLE IF EXISTS `n_encadrants_projets`;
CREATE TABLE `n_encadrants_projets` (
  `ep_id` int UNSIGNED NOT NULL,
  `ep_emo_id` int UNSIGNED NOT NULL,
  `ep_gp_id` int UNSIGNED NOT NULL,
  `ep_prof_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_etudiants`
--

DROP TABLE IF EXISTS `n_etudiants`;
CREATE TABLE `n_etudiants` (
  `etud_id` int NOT NULL,
  `etud_nom` varchar(50) NOT NULL,
  `etud_prenom` varchar(50) NOT NULL,
  `etud_nom_ar` varchar(50) DEFAULT NULL,
  `etud_prenom_ar` varchar(50) DEFAULT NULL,
  `etud_sexe` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT 'M',
  `etud_cni` varchar(20) DEFAULT NULL,
  `etud_passport` varchar(20) DEFAULT NULL,
  `etud_datenaiss` date DEFAULT NULL,
  `etud_lieunaiss` varchar(50) DEFAULT NULL,
  `etud_lieunaiss_ar` varchar(50) DEFAULT NULL,
  `etud_adresse` varchar(200) DEFAULT NULL,
  `etud_ville_id` int UNSIGNED DEFAULT NULL,
  `etud_nat_id` int UNSIGNED NOT NULL,
  `etud_email` varchar(100) DEFAULT NULL,
  `etud_tel` varchar(50) DEFAULT NULL,
  `etud_status` tinyint(1) DEFAULT '0',
  `etud_user_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_examens`
--

DROP TABLE IF EXISTS `n_examens`;
CREATE TABLE `n_examens` (
  `exam_id` int UNSIGNED NOT NULL,
  `exam_type_id` int UNSIGNED NOT NULL,
  `exam_index` int UNSIGNED NOT NULL,
  `exam_prof_id` int UNSIGNED DEFAULT NULL,
  `exam_emo_id` int UNSIGNED NOT NULL,
  `exam_sem_id` int UNSIGNED DEFAULT NULL,
  `exam_as_id` int UNSIGNED NOT NULL,
  `exam_mode` enum('P','H') NOT NULL DEFAULT 'P',
  `exam_date` datetime NOT NULL,
  `exam_date_notes` datetime DEFAULT NULL,
  `exam_coef` double DEFAULT NULL,
  `exam_seance_id` int UNSIGNED DEFAULT NULL,
  `exam_last_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_filieres`
--

DROP TABLE IF EXISTS `n_filieres`;
CREATE TABLE `n_filieres` (
  `fil_id` int UNSIGNED NOT NULL,
  `fil_nom` varchar(100) NOT NULL DEFAULT '',
  `fil_nom_ar` varchar(200) DEFAULT NULL,
  `fil_abbr` varchar(20) NOT NULL DEFAULT '',
  `fil_code` varchar(20) NOT NULL DEFAULT '',
  `fil_secteur` enum('TIC','AGC') DEFAULT NULL,
  `fil_dom_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_filiere_signataires`
--

DROP TABLE IF EXISTS `n_filiere_signataires`;
CREATE TABLE `n_filiere_signataires` (
  `fs_id` int UNSIGNED NOT NULL,
  `fs_filiere_id` int UNSIGNED NOT NULL,
  `fs_prof_id` int UNSIGNED NOT NULL,
  `fs_diplome_id` int UNSIGNED DEFAULT NULL,
  `fs_qualite` enum('CD','CF','PR') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT 'CD : Chef de departement | CF : Chef filière | PR: Professeur '
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_formations`
--

DROP TABLE IF EXISTS `n_formations`;
CREATE TABLE `n_formations` (
  `for_id` int UNSIGNED NOT NULL,
  `for_abbr` varchar(30) NOT NULL,
  `for_nom` varchar(200) NOT NULL,
  `for_diplome_id` int UNSIGNED NOT NULL,
  `for_filiere_id` int UNSIGNED NOT NULL,
  `for_est_accredite` enum('O','N') NOT NULL DEFAULT 'O',
  `for_langue` varchar(10) NOT NULL DEFAULT 'Fr',
  `for_option_id` int UNSIGNED DEFAULT NULL,
  `for_codefiliere` varchar(50) DEFAULT NULL,
  `for_codeoption` varchar(50) DEFAULT NULL,
  `for_asdebut` int UNSIGNED DEFAULT NULL,
  `for_asfin` int UNSIGNED DEFAULT NULL,
  `for_asdebut_eff` int UNSIGNED DEFAULT NULL,
  `for_asfin_eff` int UNSIGNED DEFAULT NULL,
  `for_centre_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_fraisconvenu`
--

DROP TABLE IF EXISTS `n_fraisconvenu`;
CREATE TABLE `n_fraisconvenu` (
  `fcv_id` int UNSIGNED NOT NULL,
  `fcv_montant` decimal(10,2) NOT NULL,
  `fcv_sompayee` decimal(10,2) NOT NULL DEFAULT '0.00',
  `fcv_nbperiodes` int UNSIGNED NOT NULL,
  `fcv_mtperiode` decimal(10,2) NOT NULL,
  `fcv_typefrais_id` int UNSIGNED NOT NULL,
  `fcv_ins_id` int UNSIGNED NOT NULL,
  `fcv_typeperiode_id` int UNSIGNED NOT NULL,
  `fcv_typefrais_ordre` int UNSIGNED DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_groupecritere_lignes`
--

DROP TABLE IF EXISTS `n_groupecritere_lignes`;
CREATE TABLE `n_groupecritere_lignes` (
  `gcl_id` int UNSIGNED NOT NULL,
  `gcl_gc_id` int UNSIGNED DEFAULT '0',
  `gcl_ca_id` int UNSIGNED DEFAULT '0',
  `gcl_ordre` int UNSIGNED DEFAULT '0',
  `gcl_estobligatoire` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_groupement_diplomes`
--

DROP TABLE IF EXISTS `n_groupement_diplomes`;
CREATE TABLE `n_groupement_diplomes` (
  `gd_id` int UNSIGNED NOT NULL,
  `gd_abbr` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `gd_nom` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `gd_ordre` tinyint NOT NULL DEFAULT (0)
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_groupes_criteres`
--

DROP TABLE IF EXISTS `n_groupes_criteres`;
CREATE TABLE `n_groupes_criteres` (
  `gc_id` int UNSIGNED NOT NULL,
  `gc_nom` varchar(200) NOT NULL,
  `gc_clas_id` int UNSIGNED NOT NULL DEFAULT '0',
  `gc_nat_id` int UNSIGNED DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_groupes_projets`
--

DROP TABLE IF EXISTS `n_groupes_projets`;
CREATE TABLE `n_groupes_projets` (
  `gp_id` int UNSIGNED NOT NULL,
  `gp_nom` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_inscriptions`
--

DROP TABLE IF EXISTS `n_inscriptions`;
CREATE TABLE `n_inscriptions` (
  `ins_id` int UNSIGNED NOT NULL,
  `ins_seq` int UNSIGNED DEFAULT NULL,
  `ins_numero` varchar(20) NOT NULL,
  `ins_date` datetime DEFAULT NULL,
  `ins_etudiant_id` int UNSIGNED DEFAULT NULL,
  `ins_adm_id` int UNSIGNED NOT NULL,
  `ins_classe_id` int UNSIGNED NOT NULL,
  `ins_as_id` int UNSIGNED NOT NULL COMMENT 'annee scolaire id',
  `ins_statut_id` int NOT NULL DEFAULT '-1' COMMENT 'before table creation',
  `ins_tmp_id` int UNSIGNED DEFAULT NULL,
  `ins_grp_id` int UNSIGNED DEFAULT NULL,
  `ins_gp_id` int UNSIGNED DEFAULT NULL COMMENT 'groupe projet',
  `ins_mode` enum('P','H') DEFAULT NULL,
  `ins_note_est_affiche` tinyint NOT NULL DEFAULT '1'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_inscriptions_archive`
--

DROP TABLE IF EXISTS `n_inscriptions_archive`;
CREATE TABLE `n_inscriptions_archive` (
  `ins_id` int NOT NULL,
  `ins_seq` int UNSIGNED DEFAULT NULL,
  `ins_numero` varchar(20) NOT NULL,
  `ins_date` datetime DEFAULT NULL,
  `ins_etudiant_id` int UNSIGNED DEFAULT NULL,
  `ins_adm_id` int UNSIGNED NOT NULL,
  `ins_classe_id` int UNSIGNED NOT NULL,
  `ins_as_id` int UNSIGNED NOT NULL COMMENT 'annee scolaire id',
  `ins_statut_id` int NOT NULL DEFAULT '-1' COMMENT 'before table creation',
  `ins_tmp_id` int UNSIGNED DEFAULT NULL,
  `ins_grp_id` int UNSIGNED DEFAULT NULL,
  `ins_date_archive` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_inscription_sequence`
--

DROP TABLE IF EXISTS `n_inscription_sequence`;
CREATE TABLE `n_inscription_sequence` (
  `inseq_id` int UNSIGNED NOT NULL,
  `inseq_as_id` int UNSIGNED NOT NULL,
  `inseq_filiere_id` int UNSIGNED NOT NULL,
  `inseq_sequence` int UNSIGNED NOT NULL DEFAULT '1'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_job`
--

DROP TABLE IF EXISTS `n_job`;
CREATE TABLE `n_job` (
  `job_id` int NOT NULL,
  `job_nom` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `job_url` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_jours_feries`
--

DROP TABLE IF EXISTS `n_jours_feries`;
CREATE TABLE `n_jours_feries` (
  `jf_id` int UNSIGNED NOT NULL,
  `jf_nom` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `jf_date_deb` date NOT NULL,
  `jf_date_fin` date NOT NULL,
  `jf_as_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_lignes_operation`
--

DROP TABLE IF EXISTS `n_lignes_operation`;
CREATE TABLE `n_lignes_operation` (
  `lop_id` int UNSIGNED NOT NULL,
  `lop_op_id` int UNSIGNED NOT NULL,
  `lop_cs_id` int UNSIGNED NOT NULL COMMENT 'Compte Société',
  `lop_methpay_id` int UNSIGNED NOT NULL,
  `lop_montant` decimal(20,2) NOT NULL DEFAULT '0.00',
  `lop_piece_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_localites`
--

DROP TABLE IF EXISTS `n_localites`;
CREATE TABLE `n_localites` (
  `loc_id` int UNSIGNED NOT NULL,
  `loc_nom` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_mail_list`
--

DROP TABLE IF EXISTS `n_mail_list`;
CREATE TABLE `n_mail_list` (
  `ml_id` int UNSIGNED NOT NULL,
  `ml_nom` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB COMMENT='Vérification d''adresse mail';

-- --------------------------------------------------------

--
-- Table structure for table `n_matieres`
--

DROP TABLE IF EXISTS `n_matieres`;
CREATE TABLE `n_matieres` (
  `mat_id` int UNSIGNED NOT NULL,
  `mat_centre_id` int UNSIGNED NOT NULL DEFAULT '1',
  `mat_abbr` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `mat_nom` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_membres_jury`
--

DROP TABLE IF EXISTS `n_membres_jury`;
CREATE TABLE `n_membres_jury` (
  `mj_id` int UNSIGNED NOT NULL,
  `mj_role` varchar(150) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '',
  `mj_responsable` varchar(150) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT ''
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_menus`
--

DROP TABLE IF EXISTS `n_menus`;
CREATE TABLE `n_menus` (
  `menu_id` int UNSIGNED NOT NULL,
  `menu_nom` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `menu_url` varchar(200) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `menu_icon` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `menu_ordre` int NOT NULL,
  `menu_parent` int DEFAULT NULL,
  `menu_actif` tinyint(1) NOT NULL,
  `menu_type` enum('F','N') NOT NULL,
  `menu_niveau` tinyint NOT NULL DEFAULT '1',
  `menu_app` tinyint NOT NULL DEFAULT '1'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_modeles_documents`
--

DROP TABLE IF EXISTS `n_modeles_documents`;
CREATE TABLE `n_modeles_documents` (
  `mdoc_id` int UNSIGNED NOT NULL,
  `mdoc_centre_id` int UNSIGNED NOT NULL DEFAULT '1',
  `mdoc_nom` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `mdoc_contenu` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `mdoc_typedoc_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_modules`
--

DROP TABLE IF EXISTS `n_modules`;
CREATE TABLE `n_modules` (
  `mod_id` int UNSIGNED NOT NULL,
  `mod_abbr` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `mod_nom` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_niveaux`
--

DROP TABLE IF EXISTS `n_niveaux`;
CREATE TABLE `n_niveaux` (
  `niv_id` int UNSIGNED NOT NULL,
  `niv_nom` varchar(50) NOT NULL DEFAULT ''
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_nsti_criteres`
--

DROP TABLE IF EXISTS `n_nsti_criteres`;
CREATE TABLE `n_nsti_criteres` (
  `nsti_crt_id` int UNSIGNED NOT NULL,
  `nsti_crt_nom` varchar(255) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_nsti_critere_notes`
--

DROP TABLE IF EXISTS `n_nsti_critere_notes`;
CREATE TABLE `n_nsti_critere_notes` (
  `nsti_id` int UNSIGNED NOT NULL,
  `nsti_ins_id` int UNSIGNED NOT NULL,
  `nsti_crt_id` int UNSIGNED NOT NULL,
  `nsti_crt_note` decimal(20,2) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_operations`
--

DROP TABLE IF EXISTS `n_operations`;
CREATE TABLE `n_operations` (
  `op_id` int UNSIGNED NOT NULL,
  `op_date` datetime NOT NULL,
  `op_montant` decimal(20,2) NOT NULL,
  `op_type` enum('E','S') NOT NULL,
  `op_libelle` varchar(300) NOT NULL,
  `op_user_id` int UNSIGNED NOT NULL,
  `op_rb_id` int UNSIGNED NOT NULL,
  `op_facture` varchar(20) DEFAULT NULL,
  `op_recu_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_options`
--

DROP TABLE IF EXISTS `n_options`;
CREATE TABLE `n_options` (
  `opt_id` int UNSIGNED NOT NULL,
  `opt_nom` varchar(100) NOT NULL,
  `opt_nom_ar` varchar(200) DEFAULT NULL,
  `opt_abbr` varchar(20) NOT NULL,
  `opt_filiere_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_periodes_convenues`
--

DROP TABLE IF EXISTS `n_periodes_convenues`;
CREATE TABLE `n_periodes_convenues` (
  `pcv_id` int UNSIGNED NOT NULL,
  `pcv_fcv_id` int UNSIGNED NOT NULL,
  `pcv_periode_id` int UNSIGNED NOT NULL,
  `pcv_convenu` decimal(10,2) NOT NULL,
  `pcv_est_offerte` tinyint NOT NULL DEFAULT (0)
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_periodes_payees`
--

DROP TABLE IF EXISTS `n_periodes_payees`;
CREATE TABLE `n_periodes_payees` (
  `pp_id` int UNSIGNED NOT NULL,
  `pp_pcv_id` int UNSIGNED NOT NULL,
  `pp_montant` decimal(10,2) NOT NULL,
  `pp_recu_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_permissions`
--

DROP TABLE IF EXISTS `n_permissions`;
CREATE TABLE `n_permissions` (
  `perm_id` int UNSIGNED NOT NULL,
  `perm_nom` varchar(100) DEFAULT NULL,
  `perm_type` enum('Menu','Action','Option') DEFAULT NULL,
  `perm_menu_id` int DEFAULT NULL,
  `perm_app` tinyint DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_personnel`
--

DROP TABLE IF EXISTS `n_personnel`;
CREATE TABLE `n_personnel` (
  `dir_id` int NOT NULL,
  `dir_civilite` varchar(8) DEFAULT NULL,
  `dir_nom` varchar(50) NOT NULL,
  `dir_prenom` varchar(50) NOT NULL,
  `dir_sexe` char(1) NOT NULL,
  `dir_cin` varchar(20) DEFAULT NULL,
  `dir_datenaiss` date DEFAULT NULL,
  `dir_lieunaiss` varchar(50) DEFAULT NULL,
  `dir_adresse` varchar(200) DEFAULT NULL,
  `dir_ville_id` int UNSIGNED DEFAULT NULL,
  `dir_email` varchar(100) DEFAULT NULL,
  `dir_tel` varchar(50) DEFAULT NULL,
  `dir_cnss` varchar(20) DEFAULT NULL,
  `dir_date_service` date DEFAULT NULL,
  `dir_date_depart` date DEFAULT NULL,
  `dir_user_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_personnel_centres`
--

DROP TABLE IF EXISTS `n_personnel_centres`;
CREATE TABLE `n_personnel_centres` (
  `pc_id` int UNSIGNED NOT NULL,
  `pc_pers_id` int UNSIGNED NOT NULL,
  `pc_centre_id` int UNSIGNED NOT NULL,
  `pc_centre_defaut` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_pieces`
--

DROP TABLE IF EXISTS `n_pieces`;
CREATE TABLE `n_pieces` (
  `pc_id` int UNSIGNED NOT NULL,
  `pc_reference` varchar(50) DEFAULT NULL,
  `pc_date` date DEFAULT NULL,
  `pc_type_id` int UNSIGNED NOT NULL,
  `pc_cs_id` int UNSIGNED DEFAULT NULL,
  `pc_montant` decimal(20,2) NOT NULL DEFAULT '0.00',
  `pc_date_reception` datetime DEFAULT NULL,
  `pc_date_remise` datetime DEFAULT NULL,
  `pc_titulaire` varchar(100) DEFAULT NULL,
  `pc_commentaire` varchar(300) DEFAULT NULL,
  `pc_capture` varchar(300) DEFAULT ''
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_preinscription_criteres`
--

DROP TABLE IF EXISTS `n_preinscription_criteres`;
CREATE TABLE `n_preinscription_criteres` (
  `pc_id` int UNSIGNED NOT NULL,
  `pc_preins_id` int NOT NULL,
  `pc_ca_id` int NOT NULL,
  `pc_sc_id` int NOT NULL COMMENT 'statuts criteres id',
  `pc_chemin` varchar(500) DEFAULT NULL,
  `pc_type` varchar(100) DEFAULT NULL,
  `pc_taille` decimal(20,2) NOT NULL DEFAULT '0.00',
  `pc_date_creation` datetime DEFAULT NULL,
  `pc_commentaire` varchar(500) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_preinscription_criteres_hist`
--

DROP TABLE IF EXISTS `n_preinscription_criteres_hist`;
CREATE TABLE `n_preinscription_criteres_hist` (
  `pch_id` int NOT NULL,
  `pch_pc_id` int DEFAULT NULL,
  `pch_pc_chemin` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `pch_pc_date` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_preinsmail_list`
--

DROP TABLE IF EXISTS `n_preinsmail_list`;
CREATE TABLE `n_preinsmail_list` (
  `prml_id` int UNSIGNED NOT NULL,
  `prml_ml_id` int NOT NULL,
  `prml_preins_id` int DEFAULT NULL,
  `prml_ins_id` int DEFAULT NULL,
  `prml_mailto` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `prml_addional_info` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'This is to save the addional info about the student to whom the email not sent, like password when email is for #compte d''access',
  `prml_est_envoye` tinyint(1) DEFAULT '0',
  `prml_date` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_pv_access`
--

DROP TABLE IF EXISTS `n_pv_access`;
CREATE TABLE `n_pv_access` (
  `pva_id` int UNSIGNED NOT NULL,
  `pva_diplome_id` int UNSIGNED NOT NULL DEFAULT '0',
  `pva_niveau_filiere` int UNSIGNED NOT NULL DEFAULT '0',
  `pva_mise_a_niveau` tinyint UNSIGNED NOT NULL,
  `pva_type_access` enum('D','P') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Direct, Parallèle',
  `pva_modele_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_pv_chemins`
--

DROP TABLE IF EXISTS `n_pv_chemins`;
CREATE TABLE `n_pv_chemins` (
  `pv_id` int NOT NULL,
  `pv_chemin` text NOT NULL,
  `pv_date_creation` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_pv_types`
--

DROP TABLE IF EXISTS `n_pv_types`;
CREATE TABLE `n_pv_types` (
  `pvt_id` int UNSIGNED NOT NULL,
  `pvt_centre_id` int NOT NULL DEFAULT '1',
  `pvt_abbr` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `pvt_nom` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_recouvrements`
--

DROP TABLE IF EXISTS `n_recouvrements`;
CREATE TABLE `n_recouvrements` (
  `rcv_id` int NOT NULL,
  `rcv_numero` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Numéro du dossier ',
  `rcv_date_ouverture` datetime NOT NULL,
  `rcv_date_modification` datetime DEFAULT NULL,
  `rcv_date_cloture` datetime DEFAULT NULL,
  `rcv_montant` decimal(20,2) NOT NULL DEFAULT (0),
  `rcv_ins_id` int UNSIGNED NOT NULL,
  `rcv_user_id` int UNSIGNED NOT NULL COMMENT 'Responsable du dossier recouvrement',
  `rcv_statut` enum('O','C') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Ouvert, Clos'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_recouv_echeances`
--

DROP TABLE IF EXISTS `n_recouv_echeances`;
CREATE TABLE `n_recouv_echeances` (
  `rce_id` int NOT NULL,
  `rce_rcv_id` int UNSIGNED NOT NULL,
  `rce_echeance` datetime NOT NULL,
  `rce_montant` decimal(20,2) NOT NULL DEFAULT '0.00',
  `rce_statut` enum('P','N') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Payé, Non payé',
  `rce_methpay_id` int UNSIGNED DEFAULT NULL,
  `rce_rp_id` int UNSIGNED DEFAULT NULL COMMENT 'reçu paiement ID',
  `rce_commentaire` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT ''
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_recouv_periodes`
--

DROP TABLE IF EXISTS `n_recouv_periodes`;
CREATE TABLE `n_recouv_periodes` (
  `rcp_id` int NOT NULL,
  `rcp_rcv_id` int UNSIGNED NOT NULL COMMENT 'ID du dossier de recouvrement',
  `rcp_pcv_id` int UNSIGNED NOT NULL COMMENT 'ID de la période convenue',
  `rcp_impaye` decimal(20,2) UNSIGNED NOT NULL DEFAULT (0) COMMENT 'Montant impayé de la période',
  `rcp_statut` enum('P','N') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Payé, Non payé'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_recus`
--

DROP TABLE IF EXISTS `n_recus`;
CREATE TABLE `n_recus` (
  `rec_id` int UNSIGNED NOT NULL,
  `rec_numero` varchar(20) DEFAULT NULL,
  `rec_seq` int UNSIGNED DEFAULT NULL,
  `rec_date` date DEFAULT NULL,
  `rec_montant` decimal(10,2) NOT NULL,
  `rec_inscription_id` int UNSIGNED NOT NULL,
  `rec_observation` varchar(300) DEFAULT NULL,
  `rec_user_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_recu_paiements`
--

DROP TABLE IF EXISTS `n_recu_paiements`;
CREATE TABLE `n_recu_paiements` (
  `rp_id` int UNSIGNED NOT NULL,
  `rp_recu_id` int UNSIGNED NOT NULL,
  `rp_montant` decimal(10,2) NOT NULL,
  `rp_methpay_id` int NOT NULL,
  `rp_piece_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_reductions`
--

DROP TABLE IF EXISTS `n_reductions`;
CREATE TABLE `n_reductions` (
  `red_id` int UNSIGNED NOT NULL,
  `red_typereduction_id` int UNSIGNED NOT NULL,
  `red_fcv_id` int UNSIGNED NOT NULL,
  `red_valeur` decimal(20,2) UNSIGNED NOT NULL,
  `red_base` decimal(20,2) UNSIGNED NOT NULL,
  `red_mode` enum('P','M') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Pourcentage ou Montant',
  `red_commentaire` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_resultats_admissions`
--

DROP TABLE IF EXISTS `n_resultats_admissions`;
CREATE TABLE `n_resultats_admissions` (
  `ra_id` int UNSIGNED NOT NULL,
  `ra_adm_id` int UNSIGNED NOT NULL,
  `ra_moyenne_generale` decimal(5,2) DEFAULT NULL,
  `ra_moyenne_cc` decimal(5,2) DEFAULT NULL,
  `ra_moyenne_exam_theo` decimal(5,2) DEFAULT NULL,
  `ra_moyenne_exam_pratique` decimal(5,2) DEFAULT NULL,
  `ra_note_nsti` decimal(5,2) DEFAULT NULL,
  `ra_moyenne_finale` decimal(5,2) DEFAULT NULL,
  `ra_mention` enum('Passable','Assez Bien','Bien','Très Bien','Excellent') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ra_decision` enum('Admis','Ajourné') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Ajourné'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_resultats_inscriptions`
--

DROP TABLE IF EXISTS `n_resultats_inscriptions`;
CREATE TABLE `n_resultats_inscriptions` (
  `ri_id` int UNSIGNED NOT NULL,
  `ri_ins_id` int UNSIGNED NOT NULL,
  `ri_as_id` int UNSIGNED NOT NULL,
  `ri_statut_id` int UNSIGNED DEFAULT NULL,
  `ri_note` decimal(20,2) UNSIGNED DEFAULT NULL,
  `ri_note_cc` decimal(20,2) NOT NULL DEFAULT '0.00',
  `ri_note_ep` decimal(20,2) NOT NULL DEFAULT '0.00',
  `ri_note_et` decimal(20,2) NOT NULL DEFAULT '0.00',
  `ri_note_ti` decimal(20,2) DEFAULT '0.00',
  `ri_mention` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `ri_decision` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_resultat_emo`
--

DROP TABLE IF EXISTS `n_resultat_emo`;
CREATE TABLE `n_resultat_emo` (
  `rn_id` int UNSIGNED NOT NULL,
  `rn_ins_id` int UNSIGNED NOT NULL,
  `rn_sem_id` int UNSIGNED DEFAULT NULL,
  `rn_emo_id` int UNSIGNED NOT NULL,
  `rn_note` decimal(20,2) DEFAULT '0.00',
  `rn_note_cc` decimal(20,2) DEFAULT NULL,
  `rn_note_ep` decimal(20,2) DEFAULT NULL,
  `rn_note_et` decimal(20,2) DEFAULT NULL,
  `rn_absent` tinyint(1) DEFAULT '0',
  `rn_coef` decimal(20,2) NOT NULL DEFAULT '0.00',
  `rn_substitution` decimal(20,2) DEFAULT NULL,
  `rn_statut_id` int DEFAULT NULL,
  `rn_non_visibilite` tinyint DEFAULT '1'
) ENGINE=InnoDB COMMENT='This table has been renamed from n_releves_notes to n_resultat_emo';

-- --------------------------------------------------------

--
-- Table structure for table `n_resultat_examen`
--

DROP TABLE IF EXISTS `n_resultat_examen`;
CREATE TABLE `n_resultat_examen` (
  `not_id` int UNSIGNED NOT NULL,
  `not_ins_id` int UNSIGNED NOT NULL,
  `not_exam_id` int UNSIGNED NOT NULL,
  `not_id_origine` int UNSIGNED DEFAULT NULL,
  `not_statut` enum('P','D','T') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'P' COMMENT 'P:Provisoire; T: Temporaire en cas d''absence; D:DÃ©finitive',
  `not_est_calculer` enum('O','N') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'O',
  `not_statut_id` int UNSIGNED DEFAULT NULL,
  `not_note` decimal(20,2) UNSIGNED DEFAULT NULL,
  `not_modif_par` int UNSIGNED DEFAULT NULL,
  `not_modif_date` datetime DEFAULT NULL,
  `not_commentaire` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_roles`
--

DROP TABLE IF EXISTS `n_roles`;
CREATE TABLE `n_roles` (
  `role_id` int UNSIGNED NOT NULL,
  `role_centre_id` int UNSIGNED NOT NULL DEFAULT '1',
  `role_nom` varchar(60) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `n_role_permissions`
--

DROP TABLE IF EXISTS `n_role_permissions`;
CREATE TABLE `n_role_permissions` (
  `rp_id` int UNSIGNED NOT NULL,
  `rp_perm_id` int UNSIGNED NOT NULL DEFAULT '0',
  `rp_role_id` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_rubriques_budgetaires`
--

DROP TABLE IF EXISTS `n_rubriques_budgetaires`;
CREATE TABLE `n_rubriques_budgetaires` (
  `rb_id` int UNSIGNED NOT NULL,
  `rb_parent_id` int UNSIGNED DEFAULT NULL,
  `rb_budget_id` int UNSIGNED NOT NULL,
  `rb_libelle` varchar(300) NOT NULL,
  `rb_type` enum('R','D') NOT NULL,
  `rb_prevision` decimal(20,2) NOT NULL DEFAULT (0)
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_salles`
--

DROP TABLE IF EXISTS `n_salles`;
CREATE TABLE `n_salles` (
  `salle_id` int NOT NULL,
  `salle_nom` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `salle_emplacement` varchar(100) DEFAULT NULL,
  `salle_Equipements` varchar(200) DEFAULT NULL,
  `salle_capacite` int NOT NULL,
  `salle_site_id` int NOT NULL,
  `salle_type_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_seances`
--

DROP TABLE IF EXISTS `n_seances`;
CREATE TABLE `n_seances` (
  `se_id` int UNSIGNED NOT NULL,
  `se_uet_id` int UNSIGNED DEFAULT NULL,
  `se_date` date NOT NULL,
  `se_hdeb` time NOT NULL,
  `se_hfin` time NOT NULL,
  `se_duree` smallint DEFAULT '0',
  `se_nom` varchar(200) DEFAULT '',
  `se_statut_id` int NOT NULL DEFAULT '1',
  `se_prof_absence` enum('O','N') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'N',
  `se_prof_bkp_id` int UNSIGNED DEFAULT NULL,
  `se_cahier_text` varchar(400) DEFAULT NULL,
  `se_remarque` tinytext,
  `se_type` enum('D','N','F') DEFAULT NULL,
  `se_date_edt` date DEFAULT NULL,
  `se_type_edt_id` int DEFAULT NULL,
  `se_emo_id` int DEFAULT NULL,
  `se_edt_id` int DEFAULT NULL,
  `se_prof_id` int NOT NULL,
  `se_groupe_id` int DEFAULT NULL,
  `se_salle_id` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_semestres`
--

DROP TABLE IF EXISTS `n_semestres`;
CREATE TABLE `n_semestres` (
  `sem_id` int UNSIGNED NOT NULL,
  `sem_code` varchar(5) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sem_nom` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sem_session_id` int UNSIGNED NOT NULL,
  `sem_niveau_filiere` int UNSIGNED NOT NULL COMMENT 'Niveau après Bac'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_serie_bac`
--

DROP TABLE IF EXISTS `n_serie_bac`;
CREATE TABLE `n_serie_bac` (
  `sb_id` int NOT NULL,
  `sb_nom` varchar(100) NOT NULL,
  `sb_tb_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_session`
--

DROP TABLE IF EXISTS `n_session`;
CREATE TABLE `n_session` (
  `sess_id` int NOT NULL,
  `sess_nom` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_sites`
--

DROP TABLE IF EXISTS `n_sites`;
CREATE TABLE `n_sites` (
  `site_id` int UNSIGNED NOT NULL,
  `site_nom` varchar(50) NOT NULL,
  `site_adresse` varchar(300) NOT NULL,
  `site_centre_id` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_statuts_criteres`
--

DROP TABLE IF EXISTS `n_statuts_criteres`;
CREATE TABLE `n_statuts_criteres` (
  `sc_id` int UNSIGNED NOT NULL,
  `sc_nom` varchar(60) NOT NULL,
  `sc_coleur` varchar(20) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_statuts_demandes`
--

DROP TABLE IF EXISTS `n_statuts_demandes`;
CREATE TABLE `n_statuts_demandes` (
  `ds_id` int NOT NULL,
  `ds_nom` varchar(20) NOT NULL,
  `ds_label` varchar(20) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_statuts_inscriptions`
--

DROP TABLE IF EXISTS `n_statuts_inscriptions`;
CREATE TABLE `n_statuts_inscriptions` (
  `si_id` int NOT NULL,
  `si_nom` varchar(60) NOT NULL,
  `si_coleur` varchar(20) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_statuts_seances`
--

DROP TABLE IF EXISTS `n_statuts_seances`;
CREATE TABLE `n_statuts_seances` (
  `ss_id` int UNSIGNED NOT NULL,
  `ss_nom` varchar(50) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_statut_notes`
--

DROP TABLE IF EXISTS `n_statut_notes`;
CREATE TABLE `n_statut_notes` (
  `stn_id` int UNSIGNED NOT NULL,
  `stn_nom` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `stn_code` varchar(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_suivi_demande`
--

DROP TABLE IF EXISTS `n_suivi_demande`;
CREATE TABLE `n_suivi_demande` (
  `sd_id` int UNSIGNED NOT NULL,
  `sd_demande_id` int UNSIGNED NOT NULL,
  `sd_user_preteur_id` int UNSIGNED DEFAULT NULL,
  `sd_user_livreur_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_tmp_inscription`
--

DROP TABLE IF EXISTS `n_tmp_inscription`;
CREATE TABLE `n_tmp_inscription` (
  `ins_id` int UNSIGNED NOT NULL,
  `ins_numero` varchar(20) NOT NULL,
  `ins_centre_id` int UNSIGNED NOT NULL,
  `ins_as_id` int UNSIGNED NOT NULL,
  `ins_preins_id` int UNSIGNED DEFAULT NULL,
  `ins_cne` varchar(20) DEFAULT '',
  `ins_cni` varchar(20) DEFAULT '',
  `ins_passport` varchar(20) DEFAULT '',
  `ins_nom` varchar(100) DEFAULT '',
  `ins_prenom` varchar(100) DEFAULT '',
  `ins_sexe` enum('F','M') DEFAULT NULL,
  `ins_datenaiss` date DEFAULT NULL,
  `ins_nationalite` varchar(50) DEFAULT NULL,
  `ins_codefiliere` varchar(50) DEFAULT NULL,
  `ins_niveauformation` varchar(50) DEFAULT NULL,
  `ins_situation` enum('N','R','P') DEFAULT NULL,
  `ins_diplomeacces` varchar(100) DEFAULT NULL,
  `ins_seriebac` varchar(100) DEFAULT NULL,
  `ins_anneebac` varchar(20) DEFAULT NULL,
  `ins_specialitebac` varchar(100) DEFAULT NULL,
  `ins_mentionbac` varchar(20) DEFAULT NULL,
  `ins_lieubac` varchar(100) DEFAULT NULL,
  `ins_premiereannee` varchar(20) DEFAULT NULL,
  `ins_handicape` enum('N','A','M','V','AM','AV','MV','T','XX') DEFAULT NULL,
  `ins_resident` enum('O','N') DEFAULT NULL,
  `ins_fonctionnaire` enum('O','N') DEFAULT NULL,
  `ins_estboursier` enum('O','N') DEFAULT NULL,
  `ins_bourse` decimal(20,2) DEFAULT NULL,
  `ins_mobilite` enum('O','N') DEFAULT NULL,
  `ins_documentsfournis` varchar(500) DEFAULT NULL,
  `ins_afournir` varchar(500) DEFAULT NULL,
  `ins_accordpeda` enum('V','O','R') DEFAULT NULL,
  `ins_commentairepeda` varchar(200) DEFAULT NULL,
  `ins_accordadmin` enum('V','O','R') DEFAULT NULL,
  `ins_commentaireadmin` varchar(200) DEFAULT NULL,
  `ins_anneeuniversitaire` varchar(20) DEFAULT NULL,
  `ins_classe` varchar(50) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_types_demandes`
--

DROP TABLE IF EXISTS `n_types_demandes`;
CREATE TABLE `n_types_demandes` (
  `tdem_id` int UNSIGNED NOT NULL,
  `tdem_nom` varchar(100) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_types_details_calenders`
--

DROP TABLE IF EXISTS `n_types_details_calenders`;
CREATE TABLE `n_types_details_calenders` (
  `dc_id` int NOT NULL,
  `dc_label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `dc_type_edt` tinyint DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_types_documents`
--

DROP TABLE IF EXISTS `n_types_documents`;
CREATE TABLE `n_types_documents` (
  `tdoc_id` int UNSIGNED NOT NULL,
  `tdoc_nom` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `tdoc_visibilite` enum('I','P') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'I'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_types_examens`
--

DROP TABLE IF EXISTS `n_types_examens`;
CREATE TABLE `n_types_examens` (
  `tpe_id` int NOT NULL,
  `tpe_abbr` varchar(20) NOT NULL,
  `tpe_nom` varchar(100) NOT NULL,
  `tpe_coef` decimal(20,2) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_types_pieces`
--

DROP TABLE IF EXISTS `n_types_pieces`;
CREATE TABLE `n_types_pieces` (
  `tpc_id` int UNSIGNED NOT NULL,
  `tpc_nom` varchar(100) NOT NULL,
  `tpc_code` char(1) NOT NULL,
  `tpc_type` enum('B','C') NOT NULL,
  `tpc_methpay_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_types_reclamation`
--

DROP TABLE IF EXISTS `n_types_reclamation`;
CREATE TABLE `n_types_reclamation` (
  `trec_id` int UNSIGNED NOT NULL,
  `trec_nom` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `trec_order` tinyint NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_types_reductions`
--

DROP TABLE IF EXISTS `n_types_reductions`;
CREATE TABLE `n_types_reductions` (
  `tred_id` int UNSIGNED NOT NULL,
  `tred_code` varchar(10) NOT NULL,
  `tred_nom` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_types_remarques`
--

DROP TABLE IF EXISTS `n_types_remarques`;
CREATE TABLE `n_types_remarques` (
  `trem_id` int UNSIGNED NOT NULL,
  `trem_nom` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_types_salles`
--

DROP TABLE IF EXISTS `n_types_salles`;
CREATE TABLE `n_types_salles` (
  `ts_id` int UNSIGNED NOT NULL,
  `ts_nom` varchar(100) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_type_diplome`
--

DROP TABLE IF EXISTS `n_type_diplome`;
CREATE TABLE `n_type_diplome` (
  `td_id` int UNSIGNED NOT NULL,
  `td_nom` varchar(10) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_type_edt`
--

DROP TABLE IF EXISTS `n_type_edt`;
CREATE TABLE `n_type_edt` (
  `edtype_id` int UNSIGNED NOT NULL,
  `edtype_nom` varchar(50) NOT NULL DEFAULT '',
  `edtype_type_exam_id` int UNSIGNED DEFAULT NULL,
  `edtype_couleur` varchar(20) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `n_utilisateurs`
--

DROP TABLE IF EXISTS `n_utilisateurs`;
CREATE TABLE `n_utilisateurs` (
  `user_id` int NOT NULL,
  `user_nom` varchar(60) NOT NULL,
  `user_login` varchar(60) DEFAULT NULL,
  `user_photo` varchar(200) DEFAULT NULL,
  `user_estActif` tinyint(1) DEFAULT NULL,
  `user_role_id` int DEFAULT NULL,
  `user_ref_id` int DEFAULT NULL,
  `family_name` varchar(50) DEFAULT NULL,
  `activation_code` varchar(50) DEFAULT NULL,
  `is_verified` tinyint NOT NULL DEFAULT '0',
  `phone_number` varchar(20) DEFAULT NULL,
  `first_name` varchar(100) DEFAULT NULL,
  `civility` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `formation` int DEFAULT NULL,
  `whatsapp_num` varchar(20) DEFAULT NULL,
  `centre_id` int UNSIGNED DEFAULT NULL,
  `user_dern_conx` datetime DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `observation`
--

DROP TABLE IF EXISTS `observation`;
CREATE TABLE `observation` (
  `obs_id` int NOT NULL,
  `obs_nom` varchar(40) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `param`
--

DROP TABLE IF EXISTS `param`;
CREATE TABLE `param` (
  `param_id` int UNSIGNED NOT NULL,
  `param_nom` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `param_desc` tinytext,
  `param_valeur` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `param_modifiable` tinyint(1) NOT NULL DEFAULT '0',
  `param_active` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `parameter`
--

DROP TABLE IF EXISTS `parameter`;
CREATE TABLE `parameter` (
  `id` int UNSIGNED NOT NULL,
  `nom` varchar(100) NOT NULL,
  `valeur` varchar(40) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `partenaire`
--

DROP TABLE IF EXISTS `partenaire`;
CREATE TABLE `partenaire` (
  `par_id` int UNSIGNED NOT NULL,
  `par_nom` varchar(50) DEFAULT NULL,
  `par_prenom` varchar(50) DEFAULT NULL,
  `par_code` varchar(20) DEFAULT NULL,
  `par_tel` varchar(60) DEFAULT NULL,
  `par_zone` varchar(200) DEFAULT NULL,
  `par_point_focal` varchar(70) DEFAULT NULL,
  `par_user_id` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `password_reset_tmp`
--

DROP TABLE IF EXISTS `password_reset_tmp`;
CREATE TABLE `password_reset_tmp` (
  `email` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `Tokenkey` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `expiration_date` datetime DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `pays`
--

DROP TABLE IF EXISTS `pays`;
CREATE TABLE `pays` (
  `pays_id` int UNSIGNED NOT NULL,
  `pays_nom` varchar(45) NOT NULL,
  `pays_alpha2` varchar(2) NOT NULL,
  `pays_alpha3` varchar(3) NOT NULL,
  `pays_privilegie` tinyint NOT NULL DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `periodefrais`
--

DROP TABLE IF EXISTS `periodefrais`;
CREATE TABLE `periodefrais` (
  `periode_id` int UNSIGNED NOT NULL,
  `periode_typeperiode_id` int UNSIGNED NOT NULL,
  `periode_nom` varchar(50) NOT NULL,
  `periode_abbr` varchar(20) NOT NULL,
  `periode_ordre` int NOT NULL,
  `periode_index` int NOT NULL DEFAULT '1',
  `periode_est_visible` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `periodepayee`
--

DROP TABLE IF EXISTS `periodepayee`;
CREATE TABLE `periodepayee` (
  `periodep_fraisconv_id` int NOT NULL,
  `periodep_recuetud_id` int NOT NULL,
  `periodep_montant` decimal(10,2) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `permission_context`
--

DROP TABLE IF EXISTS `permission_context`;
CREATE TABLE `permission_context` (
  `id` int NOT NULL,
  `nom` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `phase`
--

DROP TABLE IF EXISTS `phase`;
CREATE TABLE `phase` (
  `id` int UNSIGNED NOT NULL,
  `nom` varchar(50) NOT NULL,
  `url` varchar(50) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `phase_condition`
--

DROP TABLE IF EXISTS `phase_condition`;
CREATE TABLE `phase_condition` (
  `id` int UNSIGNED NOT NULL,
  `phase_id` int UNSIGNED NOT NULL,
  `condition_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `poste`
--

DROP TABLE IF EXISTS `poste`;
CREATE TABLE `poste` (
  `poste_id` int NOT NULL,
  `poste_nom` varchar(90) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `preinscription`
--

DROP TABLE IF EXISTS `preinscription`;
CREATE TABLE `preinscription` (
  `pre_id` int UNSIGNED NOT NULL,
  `pre_seq` int UNSIGNED NOT NULL DEFAULT '0',
  `pre_numero` varchar(20) DEFAULT NULL,
  `pre_civilite` varchar(20) DEFAULT NULL,
  `pre_nom` varchar(40) NOT NULL,
  `pre_prenom` varchar(40) NOT NULL,
  `pre_nom_ar` varchar(40) DEFAULT NULL,
  `pre_prenom_ar` varchar(40) DEFAULT NULL,
  `pre_sexe` char(1) DEFAULT NULL,
  `pre_date_naissance` date DEFAULT NULL,
  `pre_ville_naissance` varchar(50) DEFAULT NULL,
  `pre_ville_naissance_ar` varchar(50) DEFAULT NULL,
  `pre_tel` varchar(30) DEFAULT NULL,
  `pre_whatsapp` varchar(30) DEFAULT NULL,
  `pre_adresse` varchar(200) DEFAULT NULL,
  `pre_ville` varchar(20) DEFAULT NULL,
  `pre_cin` varchar(15) DEFAULT NULL,
  `pre_passeport` varchar(15) DEFAULT NULL,
  `pre_situation_famille` varchar(25) DEFAULT NULL,
  `pre_code_massar` varchar(20) DEFAULT NULL,
  `pre_handicape` tinyint(1) DEFAULT NULL,
  `pre_salarie` tinyint(1) DEFAULT NULL,
  `pre_pere_cnss` tinyint(1) DEFAULT NULL,
  `pre_parcours` varchar(5) DEFAULT NULL,
  `pre_comment_connu_ecole` varchar(300) DEFAULT NULL,
  `pre_droit_modif` tinyint(1) DEFAULT '1',
  `pre_camp_id` int UNSIGNED DEFAULT NULL,
  `pre_date` bigint NOT NULL,
  `pre_attest_fourni` tinyint(1) DEFAULT '0',
  `pre_nat_id` int UNSIGNED DEFAULT NULL,
  `pre_for_id` int UNSIGNED NOT NULL,
  `pre_niv_id` int UNSIGNED NOT NULL,
  `pre_centre_id` int UNSIGNED NOT NULL,
  `pre_mode` enum('P','H') DEFAULT NULL,
  `pre_date_derniere_changement` bigint DEFAULT NULL,
  `pre_annee_id` int UNSIGNED DEFAULT NULL,
  `pre_partenaire_id` int UNSIGNED DEFAULT NULL,
  `pre_source` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `pre_garant_nom` varchar(60) DEFAULT NULL,
  `pre_garant_tel` varchar(30) DEFAULT NULL,
  `pre_bac_serie` varchar(100) DEFAULT NULL,
  `pre_bac_autre_serie` varchar(150) DEFAULT NULL,
  `pre_bac_etablissement` varchar(100) DEFAULT NULL,
  `pre_bac_lieu` varchar(80) DEFAULT NULL,
  `pre_type_bac_id` int DEFAULT NULL,
  `pre_serie_bac_id` int DEFAULT NULL,
  `pre_bac_pays_id` int DEFAULT NULL,
  `pre_bac_ville_id` int DEFAULT NULL,
  `pre_bac_annee` varchar(15) DEFAULT NULL,
  `pre_bac_mention` varchar(20) DEFAULT NULL,
  `pre_visiteur_id` int UNSIGNED DEFAULT NULL,
  `pre_user_id` int UNSIGNED DEFAULT NULL,
  `pre_utilisateur_id` int UNSIGNED DEFAULT NULL,
  `pre_contacte` enum('0','1') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '0',
  `pre_tags` varchar(100) DEFAULT NULL,
  `pre_classe_id` int UNSIGNED DEFAULT NULL,
  `pre_pasrelle` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `print_permissions`
--

DROP TABLE IF EXISTS `print_permissions`;
CREATE TABLE `print_permissions` (
  `id` int NOT NULL,
  `etudiant_id` int DEFAULT NULL,
  `classe` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `annee_scolaire` varchar(15) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `print_type` int DEFAULT NULL,
  `date_impression` datetime DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `prof`
--

DROP TABLE IF EXISTS `prof`;
CREATE TABLE `prof` (
  `prof_id` int UNSIGNED NOT NULL,
  `prof_centre_id` int UNSIGNED NOT NULL DEFAULT '1',
  `prof_nom` varchar(50) NOT NULL,
  `prof_prenom` varchar(50) NOT NULL,
  `prof_sexe` char(1) NOT NULL,
  `prof_cin` varchar(20) DEFAULT NULL,
  `prof_datenaiss` date DEFAULT NULL,
  `prof_lieunaiss` varchar(50) DEFAULT NULL,
  `prof_adresse` varchar(200) DEFAULT NULL,
  `prof_ville_id` int UNSIGNED DEFAULT NULL,
  `prof_email` varchar(100) DEFAULT NULL,
  `prof_tel` varchar(50) DEFAULT NULL,
  `prof_type_pay` int UNSIGNED DEFAULT NULL,
  `prof_pay` decimal(10,2) DEFAULT NULL,
  `prof_declarer` decimal(10,2) DEFAULT NULL,
  `prof_signature` mediumtext,
  `signature_content_type` varchar(50) DEFAULT NULL,
  `prof_user_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `profile_options`
--

DROP TABLE IF EXISTS `profile_options`;
CREATE TABLE `profile_options` (
  `id` int UNSIGNED NOT NULL,
  `nom` varchar(90) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `profile_permission`
--

DROP TABLE IF EXISTS `profile_permission`;
CREATE TABLE `profile_permission` (
  `profile_perm_id` int NOT NULL,
  `profil_perm_perm` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `profil_perm_desc` varchar(200) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `profil_perm_ordre` tinyint DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `profile_permission_utilisateur`
--

DROP TABLE IF EXISTS `profile_permission_utilisateur`;
CREATE TABLE `profile_permission_utilisateur` (
  `id` int NOT NULL,
  `profile_perm_id` int NOT NULL,
  `utilisateur_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `prof_duree`
--

DROP TABLE IF EXISTS `prof_duree`;
CREATE TABLE `prof_duree` (
  `pd_id` int NOT NULL,
  `pd_prof_id` int NOT NULL,
  `pd_mois_id` int NOT NULL,
  `pd_date_de` date NOT NULL,
  `pd_date_a` date NOT NULL,
  `pd_vacation` decimal(10,2) NOT NULL,
  `pd_vacation_declarer` decimal(10,2) NOT NULL,
  `pd_nb_heure` int NOT NULL,
  `pd_nb_heure2` int NOT NULL,
  `pd_date_ajout` datetime NOT NULL,
  `pd_admin_id` int NOT NULL,
  `pd_num_cheque` varchar(50) DEFAULT NULL,
  `pd_montant_cheque` decimal(10,2) NOT NULL,
  `pd_date_cheque` date DEFAULT NULL,
  `pd_montant_espece` decimal(10,2) NOT NULL,
  `pd_montant_igr` decimal(10,2) NOT NULL,
  `pd_cheque_url` text
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `prof_mdluser`
--

DROP TABLE IF EXISTS `prof_mdluser`;
CREATE TABLE `prof_mdluser` (
  `id` int NOT NULL,
  `prof_id` int NOT NULL,
  `user_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `prof_seance`
--

DROP TABLE IF EXISTS `prof_seance`;
CREATE TABLE `prof_seance` (
  `ps_id` int NOT NULL,
  `ps_admin_id` int DEFAULT NULL,
  `ps_prof_id` int NOT NULL,
  `ps_seance_id` int NOT NULL,
  `ps_date` date NOT NULL,
  `ps_debut` time DEFAULT NULL,
  `ps_fin` time DEFAULT NULL,
  `ps_duree` int NOT NULL,
  `ps_date_ajout` datetime NOT NULL,
  `ps_division` int NOT NULL DEFAULT '1',
  `ps_cahier` mediumtext
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `prof_seance_remarque`
--

DROP TABLE IF EXISTS `prof_seance_remarque`;
CREATE TABLE `prof_seance_remarque` (
  `psr_id` int NOT NULL,
  `psr_remarque` text CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `psr_ps_id` int DEFAULT NULL,
  `psr_admin_id` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `releveimprimer`
--

DROP TABLE IF EXISTS `releveimprimer`;
CREATE TABLE `releveimprimer` (
  `id` int NOT NULL,
  `inscription_id` int DEFAULT NULL,
  `releve_type` int DEFAULT NULL,
  `date_impression` datetime DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `releve_impression`
--

DROP TABLE IF EXISTS `releve_impression`;
CREATE TABLE `releve_impression` (
  `id` int NOT NULL,
  `classe_id` int DEFAULT NULL,
  `type_print` int DEFAULT NULL,
  `anneescolaire_id` int DEFAULT NULL,
  `date_impression` datetime DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `remarque`
--

DROP TABLE IF EXISTS `remarque`;
CREATE TABLE `remarque` (
  `id` int UNSIGNED NOT NULL,
  `text` mediumtext NOT NULL,
  `date` datetime DEFAULT NULL,
  `ins_id` int UNSIGNED DEFAULT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `visible` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `type_id` int UNSIGNED NOT NULL DEFAULT '1',
  `preins_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `removed_diplome`
--

DROP TABLE IF EXISTS `removed_diplome`;
CREATE TABLE `removed_diplome` (
  `id` int UNSIGNED NOT NULL,
  `nom` varchar(10) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `removed_filiere`
--

DROP TABLE IF EXISTS `removed_filiere`;
CREATE TABLE `removed_filiere` (
  `id` int UNSIGNED NOT NULL,
  `nom` varchar(100) NOT NULL,
  `abbr` varchar(20) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `salle`
--

DROP TABLE IF EXISTS `salle`;
CREATE TABLE `salle` (
  `salle_id` int NOT NULL,
  `salle_nom` varchar(50) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `seance`
--

DROP TABLE IF EXISTS `seance`;
CREATE TABLE `seance` (
  `seance_id` int NOT NULL,
  `seance_jour` int NOT NULL,
  `seance_heuredeb` time NOT NULL,
  `seance_heurefin` time NOT NULL,
  `seance_duree` int NOT NULL,
  `seance_date_debut` date DEFAULT NULL,
  `seance_date_fin` date DEFAULT NULL,
  `seance_code` varchar(10) DEFAULT NULL,
  `seance_repeter` tinyint(1) DEFAULT '0',
  `seance_divisable` tinyint(1) DEFAULT '0',
  `seance_pause` tinyint(1) DEFAULT '0',
  `seance_type_formation` int DEFAULT NULL,
  `seance_salle_id` int DEFAULT NULL,
  `seance_mm_id` int NOT NULL,
  `seance_prof_id` int NOT NULL,
  `seance_emploi_id` int NOT NULL,
  `seance_seance_deroule_id` int NOT NULL DEFAULT '2',
  `seance_form_der_id` int DEFAULT NULL,
  `seance_confirmer` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `seance_collection`
--

DROP TABLE IF EXISTS `seance_collection`;
CREATE TABLE `seance_collection` (
  `scol_id` int NOT NULL,
  `scol_annee_id` int DEFAULT NULL,
  `scol_session_id` int DEFAULT NULL,
  `scol_prof_id` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `seance_commune`
--

DROP TABLE IF EXISTS `seance_commune`;
CREATE TABLE `seance_commune` (
  `scom_id` int NOT NULL,
  `scom_seance_id` int DEFAULT NULL,
  `scom_scol_id` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `seance_contenu`
--

DROP TABLE IF EXISTS `seance_contenu`;
CREATE TABLE `seance_contenu` (
  `seance_contenu_id` int NOT NULL,
  `seance_centenu_contenu` text CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `seance_contenu_prof_seance_id` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `seance_demande`
--

DROP TABLE IF EXISTS `seance_demande`;
CREATE TABLE `seance_demande` (
  `seadem_id` int NOT NULL,
  `seadem_jour` int NOT NULL,
  `seadem_heuredeb` time NOT NULL,
  `seadem_heurefin` time NOT NULL,
  `seadem_seance_id` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `seance_deroulement`
--

DROP TABLE IF EXISTS `seance_deroulement`;
CREATE TABLE `seance_deroulement` (
  `seance_deroule_id` int NOT NULL,
  `seance_deroule_type` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `secteur`
--

DROP TABLE IF EXISTS `secteur`;
CREATE TABLE `secteur` (
  `secteur_id` int NOT NULL,
  `secteur_nom` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `semestre`
--

DROP TABLE IF EXISTS `semestre`;
CREATE TABLE `semestre` (
  `id` int NOT NULL,
  `semestre_nom` varchar(15) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `semestre_nom_fr` varchar(15) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `session`
--

DROP TABLE IF EXISTS `session`;
CREATE TABLE `session` (
  `sess_id` int NOT NULL,
  `sess_nom` varchar(100) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `site`
--

DROP TABLE IF EXISTS `site`;
CREATE TABLE `site` (
  `site_id` int UNSIGNED NOT NULL,
  `site_nom` varchar(50) NOT NULL,
  `site_centre_id` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `sms`
--

DROP TABLE IF EXISTS `sms`;
CREATE TABLE `sms` (
  `sms_id` int NOT NULL,
  `sms_objet` varchar(100) NOT NULL,
  `sms_message` text NOT NULL,
  `sms_date` datetime NOT NULL,
  `sms_user_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `societe`
--

DROP TABLE IF EXISTS `societe`;
CREATE TABLE `societe` (
  `societe_id` int NOT NULL,
  `societe_nom` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `stage`
--

DROP TABLE IF EXISTS `stage`;
CREATE TABLE `stage` (
  `id` int NOT NULL,
  `ins_id` int DEFAULT NULL,
  `date_stage` date DEFAULT NULL,
  `lieu` varchar(40) DEFAULT NULL,
  `sujet` text,
  `encadrant_id` int DEFAULT NULL,
  `cordinateur_id` int DEFAULT NULL,
  `binome_id` int DEFAULT NULL,
  `passe` tinyint(1) DEFAULT '0',
  `date_soutenance` date DEFAULT NULL,
  `date_ajout` date DEFAULT NULL,
  `type` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `suivre_laureat`
--

DROP TABLE IF EXISTS `suivre_laureat`;
CREATE TABLE `suivre_laureat` (
  `suivre_id` int NOT NULL,
  `suivre_ins_id` int DEFAULT NULL,
  `suivre_poste_id` int DEFAULT NULL,
  `suivre_societe_id` int DEFAULT NULL,
  `suivre_secteur_id` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `suppliers`
--

DROP TABLE IF EXISTS `suppliers`;
CREATE TABLE `suppliers` (
  `id` bigint NOT NULL,
  `supplier_code` varchar(50) NOT NULL,
  `name` varchar(50) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `supp_filiere`
--

DROP TABLE IF EXISTS `supp_filiere`;
CREATE TABLE `supp_filiere` (
  `filiere_id` int NOT NULL,
  `filiere_nom` varchar(100) DEFAULT NULL,
  `filiere_nom_complet` varchar(100) NOT NULL,
  `filiere_nom_complet_ar` varchar(200) DEFAULT NULL,
  `filiere_type` varchar(100) NOT NULL,
  `filiere_duree` varchar(100) NOT NULL,
  `filiere_sibiling` int DEFAULT NULL
) ENGINE=InnoDB COMMENT='This  table is used inside management app';

-- --------------------------------------------------------

--
-- Table structure for table `supp_filiere_bac`
--

DROP TABLE IF EXISTS `supp_filiere_bac`;
CREATE TABLE `supp_filiere_bac` (
  `id` int UNSIGNED NOT NULL,
  `bac_id` int UNSIGNED DEFAULT NULL,
  `filiere_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB COMMENT='To be deleted after test';

-- --------------------------------------------------------

--
-- Table structure for table `supp_inscription`
--

DROP TABLE IF EXISTS `supp_inscription`;
CREATE TABLE `supp_inscription` (
  `ins_id` int UNSIGNED NOT NULL,
  `ins_date` date NOT NULL,
  `ins_seq` int UNSIGNED NOT NULL DEFAULT '0',
  `ins_numero` varchar(20) DEFAULT NULL,
  `ins_etud_id` int UNSIGNED NOT NULL,
  `ins_classe_id` int UNSIGNED NOT NULL,
  `ins_annee_id` int UNSIGNED NOT NULL,
  `ins_typeformation` int UNSIGNED DEFAULT NULL,
  `ins_statut` int UNSIGNED NOT NULL,
  `ins_form_der_id` int UNSIGNED DEFAULT '1',
  `ins_abond` tinyint(1) NOT NULL DEFAULT '0',
  `ins_valide` int UNSIGNED NOT NULL DEFAULT '0',
  `ins_dec` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB COMMENT='This will be replaced with the new table.';

-- --------------------------------------------------------

--
-- Table structure for table `supp_inscription_tag`
--

DROP TABLE IF EXISTS `supp_inscription_tag`;
CREATE TABLE `supp_inscription_tag` (
  `id` int UNSIGNED NOT NULL,
  `inscription_id` int UNSIGNED DEFAULT NULL,
  `tag_id` int UNSIGNED DEFAULT NULL,
  `user_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB COMMENT='To be deleted after test';

-- --------------------------------------------------------

--
-- Table structure for table `tag`
--

DROP TABLE IF EXISTS `tag`;
CREATE TABLE `tag` (
  `id` int UNSIGNED NOT NULL,
  `nom` varchar(100) NOT NULL,
  `description` mediumtext,
  `utilisateur_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `trace`
--

DROP TABLE IF EXISTS `trace`;
CREATE TABLE `trace` (
  `trace_id` int NOT NULL,
  `trace_description` varchar(100) NOT NULL,
  `trace_date` datetime NOT NULL,
  `trace_user_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `traitement`
--

DROP TABLE IF EXISTS `traitement`;
CREATE TABLE `traitement` (
  `id` int UNSIGNED NOT NULL,
  `date` bigint NOT NULL,
  `action` mediumtext NOT NULL,
  `ins_id` int UNSIGNED DEFAULT NULL,
  `userid` int UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `tuteur`
--

DROP TABLE IF EXISTS `tuteur`;
CREATE TABLE `tuteur` (
  `tut_id` int NOT NULL,
  `tut_nom` varchar(50) NOT NULL,
  `tut_prenom` varchar(50) NOT NULL,
  `tut_cin` varchar(20) NOT NULL,
  `tut_tel` varchar(50) DEFAULT NULL,
  `tut_adresse` varchar(150) DEFAULT NULL,
  `tut_fonction` varchar(50) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `tuteur_etudiant`
--

DROP TABLE IF EXISTS `tuteur_etudiant`;
CREATE TABLE `tuteur_etudiant` (
  `etud_id` int NOT NULL,
  `tut_id` int NOT NULL,
  `lien_parente` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `typectr`
--

DROP TABLE IF EXISTS `typectr`;
CREATE TABLE `typectr` (
  `typectr_id` int NOT NULL,
  `typectr_nom` varchar(60) NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `typeformation`
--

DROP TABLE IF EXISTS `typeformation`;
CREATE TABLE `typeformation` (
  `typeformation_id` int NOT NULL,
  `typeFormation_nom` varchar(100) NOT NULL,
  `typeFormation_code` varchar(20) DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `typefrais`
--

DROP TABLE IF EXISTS `typefrais`;
CREATE TABLE `typefrais` (
  `tpf_id` int UNSIGNED NOT NULL,
  `tpf_nom` varchar(50) DEFAULT NULL,
  `tpf_code` varchar(10) DEFAULT NULL,
  `tpf_ordre` tinyint DEFAULT NULL,
  `tpf_typeperiode_id` int UNSIGNED DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `typeperiodefrais`
--

DROP TABLE IF EXISTS `typeperiodefrais`;
CREATE TABLE `typeperiodefrais` (
  `tp_id` int UNSIGNED NOT NULL,
  `tp_nom` varchar(50) DEFAULT NULL,
  `tp_nbperiodes` int UNSIGNED NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `type_bac`
--

DROP TABLE IF EXISTS `type_bac`;
CREATE TABLE `type_bac` (
  `tb_id` int UNSIGNED NOT NULL,
  `tb_nom` varchar(70) NOT NULL,
  `tb_active` tinyint NOT NULL DEFAULT '1',
  `tb_ordre` tinyint DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `type_diplome_access`
--

DROP TABLE IF EXISTS `type_diplome_access`;
CREATE TABLE `type_diplome_access` (
  `type_id` int UNSIGNED NOT NULL,
  `type_name` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `type_releve`
--

DROP TABLE IF EXISTS `type_releve`;
CREATE TABLE `type_releve` (
  `id` int NOT NULL,
  `releve_type` varchar(15) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `releve_attr` varchar(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `user_fiche`
--

DROP TABLE IF EXISTS `user_fiche`;
CREATE TABLE `user_fiche` (
  `userfiche_id` int NOT NULL,
  `userfiche_user_id` int DEFAULT NULL,
  `userfiche_fiche_id` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `user_menu`
--

DROP TABLE IF EXISTS `user_menu`;
CREATE TABLE `user_menu` (
  `um_id` int NOT NULL,
  `um_user_id` int NOT NULL,
  `um_menu_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `utilisateur`
--

DROP TABLE IF EXISTS `utilisateur`;
CREATE TABLE `utilisateur` (
  `user_id` int NOT NULL,
  `user_nom` varchar(60) NOT NULL,
  `user_login` varchar(60) NOT NULL,
  `user_photo` varchar(200) DEFAULT NULL,
  `user_estActif` tinyint(1) NOT NULL,
  `user_role_id` int NOT NULL,
  `user_ref_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `utilisateur_departement`
--

DROP TABLE IF EXISTS `utilisateur_departement`;
CREATE TABLE `utilisateur_departement` (
  `userdepart_id` int UNSIGNED NOT NULL,
  `userdepart_user_id` int NOT NULL,
  `userdepart_depart_id` int NOT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `utilisateur_permission`
--

DROP TABLE IF EXISTS `utilisateur_permission`;
CREATE TABLE `utilisateur_permission` (
  `id` int NOT NULL,
  `userid` int DEFAULT NULL,
  `context_id` int DEFAULT NULL,
  `permission_id` int DEFAULT NULL
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `ville`
--

DROP TABLE IF EXISTS `ville`;
CREATE TABLE `ville` (
  `vil_id` int UNSIGNED NOT NULL,
  `vil_nom_fr` varchar(50) NOT NULL,
  `vil_nom_ar` varchar(50) DEFAULT NULL,
  `vil_pays_id` int UNSIGNED DEFAULT NULL,
  `vil_active` int DEFAULT '0'
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Table structure for table `visiteur`
--

DROP TABLE IF EXISTS `visiteur`;
CREATE TABLE `visiteur` (
  `id` int NOT NULL,
  `nom` varchar(40) NOT NULL,
  `prenom` varchar(40) NOT NULL,
  `nom_ar` varchar(40) DEFAULT NULL,
  `prenom_ar` varchar(50) DEFAULT NULL,
  `sexe` char(1) DEFAULT NULL,
  `date_naissance` date DEFAULT NULL,
  `ville_naissance` varchar(30) DEFAULT NULL,
  `ville_naissance_ar` varchar(60) DEFAULT NULL,
  `tel` varchar(40) DEFAULT NULL,
  `whatsapp` varchar(30) DEFAULT NULL,
  `adresse` varchar(200) DEFAULT NULL,
  `ville` varchar(20) DEFAULT NULL,
  `cin` varchar(30) DEFAULT NULL,
  `situation_famille` varchar(25) DEFAULT NULL,
  `code_massar` varchar(20) DEFAULT NULL,
  `handicape` tinyint(1) DEFAULT NULL,
  `salarie` tinyint(1) DEFAULT NULL,
  `pere_cnss` tinyint(1) DEFAULT NULL,
  `parcours` varchar(5) DEFAULT NULL,
  `comment_connu_ecole` mediumtext,
  `etudiant_id` int DEFAULT NULL,
  `numero_inscription` varchar(10) DEFAULT NULL,
  `droit_modif` tinyint(1) DEFAULT '1',
  `camp_id` int DEFAULT NULL,
  `user_direction` varchar(30) DEFAULT NULL
) ENGINE=InnoDB;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `absenceetudiant`
--
ALTER TABLE `absenceetudiant`
  ADD PRIMARY KEY (`absetud_id`);

--
-- Indexes for table `absenceprof`
--
ALTER TABLE `absenceprof`
  ADD PRIMARY KEY (`absprof_id`);

--
-- Indexes for table `accueil`
--
ALTER TABLE `accueil`
  ADD PRIMARY KEY (`acc_id`);

--
-- Indexes for table `anneescolaire`
--
ALTER TABLE `anneescolaire`
  ADD PRIMARY KEY (`annee_id`) USING BTREE,
  ADD KEY `annee_nom` (`annee_nom`);

--
-- Indexes for table `attachement`
--
ALTER TABLE `attachement`
  ADD PRIMARY KEY (`att_id`);

--
-- Indexes for table `attestation`
--
ALTER TABLE `attestation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `attestation_generer`
--
ALTER TABLE `attestation_generer`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `backup_resultat_exam`
--
ALTER TABLE `backup_resultat_exam`
  ADD PRIMARY KEY (`bk_id`) USING BTREE,
  ADD KEY `bk_exam_id` (`bk_exam_id`) USING BTREE,
  ADD KEY `bk_type_exam` (`bk_type_exam`) USING BTREE,
  ADD KEY `bk_emo_id` (`bk_emo_id`) USING BTREE,
  ADD KEY `bk_ins_id` (`bk_ins_id`) USING BTREE;

--
-- Indexes for table `banques`
--
ALTER TABLE `banques`
  ADD PRIMARY KEY (`bnk_id`),
  ADD UNIQUE KEY `bnk_code` (`bnk_code`);

--
-- Indexes for table `campagne`
--
ALTER TABLE `campagne`
  ADD PRIMARY KEY (`camp_id`) USING BTREE;

--
-- Indexes for table `centre`
--
ALTER TABLE `centre`
  ADD PRIMARY KEY (`ct_id`) USING BTREE,
  ADD KEY `ct_ville_id` (`ct_ville_id`),
  ADD KEY `ct_nat_id` (`ct_nat_id`);

--
-- Indexes for table `classe`
--
ALTER TABLE `classe`
  ADD PRIMARY KEY (`classe_id`),
  ADD KEY `classe_abbr` (`classe_abbr`),
  ADD KEY `classe_formation_id` (`classe_formation_id`),
  ADD KEY `classe_niveau_filiere` (`classe_niveau_filiere`),
  ADD KEY `classe_niveau_apresbac` (`classe_niveau_apresbac`),
  ADD KEY `classe_asdebut` (`classe_asdebut`),
  ADD KEY `classe_asfin` (`classe_asfin`);

--
-- Indexes for table `classe_cohort`
--
ALTER TABLE `classe_cohort`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `classe_typereleve`
--
ALTER TABLE `classe_typereleve`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ctr`
--
ALTER TABLE `ctr`
  ADD PRIMARY KEY (`ctr_id`),
  ADD KEY `ctr_classe_id` (`ctr_classe_id`),
  ADD KEY `ctr_sess_id` (`ctr_sess_id`),
  ADD KEY `ctr_annee_id` (`ctr_annee_id`),
  ADD KEY `ctr_typectr_id` (`ctr_typectr_id`);

--
-- Indexes for table `ctrmm`
--
ALTER TABLE `ctrmm`
  ADD PRIMARY KEY (`ctrmm_id`),
  ADD KEY `ctrmm_ctr_id` (`ctrmm_ctr_id`),
  ADD KEY `ctrmm_mm_id` (`ctrmm_mm_id`);

--
-- Indexes for table `demande`
--
ALTER TABLE `demande`
  ADD PRIMARY KEY (`demande_id`);

--
-- Indexes for table `demande_statut`
--
ALTER TABLE `demande_statut`
  ADD PRIMARY KEY (`ds_id`) USING BTREE;

--
-- Indexes for table `departement`
--
ALTER TABLE `departement`
  ADD PRIMARY KEY (`depart_id`);

--
-- Indexes for table `departement_classe`
--
ALTER TABLE `departement_classe`
  ADD PRIMARY KEY (`departclasse_id`);

--
-- Indexes for table `depense`
--
ALTER TABLE `depense`
  ADD PRIMARY KEY (`depense_id`);

--
-- Indexes for table `depenses`
--
ALTER TABLE `depenses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `supplier_id` (`supplier_id`);

--
-- Indexes for table `depense_details`
--
ALTER TABLE `depense_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `depense_id` (`depense_id`);

--
-- Indexes for table `dep_ben`
--
ALTER TABLE `dep_ben`
  ADD PRIMARY KEY (`db_id`);

--
-- Indexes for table `dep_log`
--
ALTER TABLE `dep_log`
  ADD PRIMARY KEY (`dl_id`);

--
-- Indexes for table `dep_ref`
--
ALTER TABLE `dep_ref`
  ADD PRIMARY KEY (`dep_ref_id`);

--
-- Indexes for table `destinataire_sms`
--
ALTER TABLE `destinataire_sms`
  ADD PRIMARY KEY (`ds_id`);

--
-- Indexes for table `details_calendrier_pedagogique`
--
ALTER TABLE `details_calendrier_pedagogique`
  ADD PRIMARY KEY (`Det_id`) USING BTREE,
  ADD KEY `idx_det_calendrier_id` (`Det_calendrier_id`) USING BTREE;

--
-- Indexes for table `devoir`
--
ALTER TABLE `devoir`
  ADD PRIMARY KEY (`dev_id`);

--
-- Indexes for table `devoiretud`
--
ALTER TABLE `devoiretud`
  ADD PRIMARY KEY (`devetud_id`);

--
-- Indexes for table `direction`
--
ALTER TABLE `direction`
  ADD PRIMARY KEY (`dir_id`),
  ADD KEY `dir_user_id` (`dir_user_id`),
  ADD KEY `dir_ville_id` (`dir_ville_id`);

--
-- Indexes for table `emploitemps`
--
ALTER TABLE `emploitemps`
  ADD PRIMARY KEY (`emploi_id`);

--
-- Indexes for table `etudiant`
--
ALTER TABLE `etudiant`
  ADD PRIMARY KEY (`etud_id`);

--
-- Indexes for table `etudiants_option`
--
ALTER TABLE `etudiants_option`
  ADD PRIMARY KEY (`etudopt_id`);

--
-- Indexes for table `etudiant_document`
--
ALTER TABLE `etudiant_document`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `etudiant_inscription`
--
ALTER TABLE `etudiant_inscription`
  ADD PRIMARY KEY (`ins_id`);

--
-- Indexes for table `etudiant_mdluser`
--
ALTER TABLE `etudiant_mdluser`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `etud_id` (`etud_id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `etud_abs`
--
ALTER TABLE `etud_abs`
  ADD PRIMARY KEY (`absetud_id`);

--
-- Indexes for table `etud_log`
--
ALTER TABLE `etud_log`
  ADD PRIMARY KEY (`el_id`);

--
-- Indexes for table `etud_obs`
--
ALTER TABLE `etud_obs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `etud_remarque`
--
ALTER TABLE `etud_remarque`
  ADD PRIMARY KEY (`er_id`);

--
-- Indexes for table `evenement`
--
ALTER TABLE `evenement`
  ADD PRIMARY KEY (`even_id`);

--
-- Indexes for table `fiche`
--
ALTER TABLE `fiche`
  ADD PRIMARY KEY (`fiche_id`);

--
-- Indexes for table `file_upload_permessions`
--
ALTER TABLE `file_upload_permessions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `filiere`
--
ALTER TABLE `filiere`
  ADD PRIMARY KEY (`fil_id`),
  ADD UNIQUE KEY `fil_abbr` (`fil_abbr`),
  ADD KEY `fil_dom_id` (`fil_dom_id`);

--
-- Indexes for table `filiere_bac`
--
ALTER TABLE `filiere_bac`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `formation_deroulement`
--
ALTER TABLE `formation_deroulement`
  ADD PRIMARY KEY (`form_der_id`);

--
-- Indexes for table `garant_financiere`
--
ALTER TABLE `garant_financiere`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `groupes`
--
ALTER TABLE `groupes`
  ADD PRIMARY KEY (`grp_id`) USING BTREE;

--
-- Indexes for table `historique_log`
--
ALTER TABLE `historique_log`
  ADD PRIMARY KEY (`log_id`);

--
-- Indexes for table `inscription`
--
ALTER TABLE `inscription`
  ADD PRIMARY KEY (`ins_id`),
  ADD KEY `ins_etud_id` (`ins_etud_id`),
  ADD KEY `ins_classe_id` (`ins_classe_id`),
  ADD KEY `ins_annee_id` (`ins_annee_id`),
  ADD KEY `ins_form_der_id` (`ins_form_der_id`);

--
-- Indexes for table `inscription_demande`
--
ALTER TABLE `inscription_demande`
  ADD PRIMARY KEY (`insdem_id`);

--
-- Indexes for table `inscription_demande_remarque`
--
ALTER TABLE `inscription_demande_remarque`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `inscription_document`
--
ALTER TABLE `inscription_document`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ins_id` (`ins_id`),
  ADD KEY `doc_id` (`doc_id`);

--
-- Indexes for table `inscription_option`
--
ALTER TABLE `inscription_option`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `inscription_tag`
--
ALTER TABLE `inscription_tag`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `langue_niveau`
--
ALTER TABLE `langue_niveau`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mail`
--
ALTER TABLE `mail`
  ADD PRIMARY KEY (`mail_id`);

--
-- Indexes for table `mailatt`
--
ALTER TABLE `mailatt`
  ADD PRIMARY KEY (`mailatt_id`);

--
-- Indexes for table `matiere`
--
ALTER TABLE `matiere`
  ADD PRIMARY KEY (`mat_id`);

--
-- Indexes for table `menu`
--
ALTER TABLE `menu`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `methodepayement`
--
ALTER TABLE `methodepayement`
  ADD PRIMARY KEY (`methpay_id`);

--
-- Indexes for table `modmat`
--
ALTER TABLE `modmat`
  ADD PRIMARY KEY (`mm_id`),
  ADD KEY `mm_mod_id` (`mm_mod_id`),
  ADD KEY `mm_mat_id` (`mm_mat_id`),
  ADD KEY `mm_session_id` (`mm_session_id`);

--
-- Indexes for table `module`
--
ALTER TABLE `module`
  ADD PRIMARY KEY (`mod_id`),
  ADD KEY `mod_filiere_id` (`mod_filiere_id`),
  ADD KEY `mod_annee_id` (`mod_annee_id`),
  ADD KEY `mod_typeformation_id` (`mod_typeformation_id`);

--
-- Indexes for table `mois`
--
ALTER TABLE `mois`
  ADD PRIMARY KEY (`mois_id`);

--
-- Indexes for table `moyenne_emo`
--
ALTER TABLE `moyenne_emo`
  ADD PRIMARY KEY (`moy_id`) USING BTREE,
  ADD KEY `moy_emo` (`moy_emo`) USING BTREE,
  ADD KEY `moy_ins_id` (`moy_ins_id`) USING BTREE;

--
-- Indexes for table `nationalite`
--
ALTER TABLE `nationalite`
  ADD PRIMARY KEY (`nat_id`) USING BTREE;

--
-- Indexes for table `notde`
--
ALTER TABLE `notde`
  ADD PRIMARY KEY (`notde_id`);

--
-- Indexes for table `note`
--
ALTER TABLE `note`
  ADD PRIMARY KEY (`note_id`),
  ADD KEY `note_ctrmm_id` (`note_ctrmm_id`),
  ADD KEY `note_ins_id` (`note_ins_id`);

--
-- Indexes for table `notep`
--
ALTER TABLE `notep`
  ADD PRIMARY KEY (`note_id`),
  ADD KEY `note_ctrmm_id` (`note_ctrmm_id`),
  ADD KEY `note_ins_id` (`note_ins_id`);

--
-- Indexes for table `notifications`
--
ALTER TABLE `notifications`
  ADD PRIMARY KEY (`not_id`) USING BTREE,
  ADD KEY `not_user_id` (`not_user_id`),
  ADD KEY `not_role_id` (`not_role_id`);

--
-- Indexes for table `n_absences`
--
ALTER TABLE `n_absences`
  ADD PRIMARY KEY (`abs_id`),
  ADD KEY `abs_seance_id` (`abs_seance_id`),
  ADD KEY `abs_uet_id_abs_ins_id_abs_type` (`abs_uet_id`,`abs_ins_id`,`abs_type`);

--
-- Indexes for table `n_admissions`
--
ALTER TABLE `n_admissions`
  ADD PRIMARY KEY (`adm_id`),
  ADD KEY `adm_supmti_id` (`adm_supmti_id`),
  ADD KEY `adm_etudiant_id` (`adm_etudiant_id`),
  ADD KEY `adm_formation_id` (`adm_formation_id`),
  ADD KEY `adm_centre_id` (`adm_centre_id`),
  ADD KEY `adm_as_id` (`adm_as_id`),
  ADD KEY `adm_preins_id` (`adm_preins_id`),
  ADD KEY `adm_statut_id` (`adm_statut_id`),
  ADD KEY `adm_centre_admin_id` (`adm_centre_admin_id`),
  ADD KEY `adm_localite_id` (`adm_localite_id`),
  ADD KEY `adm_mode` (`adm_mode`),
  ADD KEY `adm_site_id` (`adm_site_id`);

--
-- Indexes for table `n_admission_diplome`
--
ALTER TABLE `n_admission_diplome`
  ADD PRIMARY KEY (`dip_id`) USING BTREE,
  ADD KEY `idx_dip_adm_id` (`dip_adm_id`),
  ADD KEY `idx_dip_annee_id` (`dip_annee_id`);

--
-- Indexes for table `n_admission_miseaniveau`
--
ALTER TABLE `n_admission_miseaniveau`
  ADD PRIMARY KEY (`am_id`),
  ADD KEY `am_adm_id` (`am_adm_id`),
  ADD KEY `am_module_id` (`am_modules`) USING BTREE;

--
-- Indexes for table `n_batch`
--
ALTER TABLE `n_batch`
  ADD PRIMARY KEY (`bat_id`);

--
-- Indexes for table `n_budgets`
--
ALTER TABLE `n_budgets`
  ADD PRIMARY KEY (`bud_id`),
  ADD KEY `bud_as_id` (`bud_as_id`),
  ADD KEY `bud_centre_id` (`bud_centre_id`);

--
-- Indexes for table `n_cahier_text`
--
ALTER TABLE `n_cahier_text`
  ADD PRIMARY KEY (`cht_id`);

--
-- Indexes for table `n_calendrier_pedagogiques`
--
ALTER TABLE `n_calendrier_pedagogiques`
  ADD PRIMARY KEY (`cal_id`) USING BTREE;

--
-- Indexes for table `n_centre_formations`
--
ALTER TABLE `n_centre_formations`
  ADD PRIMARY KEY (`cfm_id`),
  ADD KEY `cfm_centre_id` (`cfm_centre_id`),
  ADD KEY `cfm_for_id` (`cfm_for_id`);

--
-- Indexes for table `n_centre_param`
--
ALTER TABLE `n_centre_param`
  ADD PRIMARY KEY (`cp_id`) USING BTREE,
  ADD KEY `cp_centre_id_idx` (`cp_centre_id`) USING BTREE;

--
-- Indexes for table `n_comptes_societe`
--
ALTER TABLE `n_comptes_societe`
  ADD PRIMARY KEY (`cs_id`),
  ADD KEY `cs_banque_id` (`cs_banque_id`),
  ADD KEY `cs_ville_id` (`cs_ville_id`),
  ADD KEY `cs_centre_id` (`cs_centre_id`);

--
-- Indexes for table `n_criteres_access`
--
ALTER TABLE `n_criteres_access`
  ADD PRIMARY KEY (`ca_id`);

--
-- Indexes for table `n_deliberations`
--
ALTER TABLE `n_deliberations`
  ADD PRIMARY KEY (`del_id`) USING BTREE,
  ADD KEY `del_classe_id` (`del_classe_id`) USING BTREE;

--
-- Indexes for table `n_demandes`
--
ALTER TABLE `n_demandes`
  ADD PRIMARY KEY (`dem_id`) USING BTREE,
  ADD KEY `dem_ins_id` (`dem_ins_id`) USING BTREE,
  ADD KEY `dem_user_id` (`dem_user_id`) USING BTREE,
  ADD KEY `dem_type_id` (`dem_type_id`) USING BTREE,
  ADD KEY `dem_typedoc_id` (`dem_typedoc_id`) USING BTREE,
  ADD KEY `dem_modele_id` (`dem_modele_id`) USING BTREE,
  ADD KEY `dem_createur_id` (`dem_createur_id`) USING BTREE;

--
-- Indexes for table `n_demande_commentaires`
--
ALTER TABLE `n_demande_commentaires`
  ADD PRIMARY KEY (`cd_id`),
  ADD KEY `cd_demande_id` (`cd_demande_id`),
  ADD KEY `cd_user_id` (`cd_user_id`);

--
-- Indexes for table `n_diplomes`
--
ALTER TABLE `n_diplomes`
  ADD PRIMARY KEY (`dip_id`),
  ADD UNIQUE KEY `dip_abbr` (`dip_abbr`),
  ADD KEY `dip_gd_id` (`dip_gd_id`);

--
-- Indexes for table `n_diplomes_acces`
--
ALTER TABLE `n_diplomes_acces`
  ADD PRIMARY KEY (`da_id`) USING BTREE,
  ADD KEY `da_preins_id` (`da_preins_id`),
  ADD KEY `pays_id` (`da_pays_id`) USING BTREE,
  ADD KEY `ville_id` (`da_ville_id`) USING BTREE,
  ADD KEY `diplome_id` (`da_type_diplome_id`) USING BTREE;

--
-- Indexes for table `n_diplome_document`
--
ALTER TABLE `n_diplome_document`
  ADD PRIMARY KEY (`dd_id`);

--
-- Indexes for table `n_domaines`
--
ALTER TABLE `n_domaines`
  ADD PRIMARY KEY (`dom_id`);

--
-- Indexes for table `n_edt`
--
ALTER TABLE `n_edt`
  ADD PRIMARY KEY (`edt_id`),
  ADD KEY `edt_classe_id` (`edt_classe_id`),
  ADD KEY `edt_as_id` (`edt_as_id`),
  ADD KEY `edt_session_id` (`edt_sem_id`) USING BTREE,
  ADD KEY `edt_calender_id` (`edt_calender_id`),
  ADD KEY `edt_groupe` (`edt_groupe`);

--
-- Indexes for table `n_edt_unites`
--
ALTER TABLE `n_edt_unites`
  ADD PRIMARY KEY (`uet_id`),
  ADD KEY `uet_edt_id` (`uet_edt_id`),
  ADD KEY `uet_salle_id` (`uet_salle_id`),
  ADD KEY `uet_emo_id` (`uet_emo_id`),
  ADD KEY `uet_prof_id` (`uet_prof_id`),
  ADD KEY `uet_groupe_id` (`uet_groupe_id`);

--
-- Indexes for table `n_elements_modules`
--
ALTER TABLE `n_elements_modules`
  ADD PRIMARY KEY (`emo_id`),
  ADD KEY `emo_mod_id` (`emo_mod_id`),
  ADD KEY `emo_mat_id` (`emo_mat_id`),
  ADD KEY `emo_classe_id` (`emo_classe_id`),
  ADD KEY `emo_sem_id` (`emo_sem_id`),
  ADD KEY `emo_prof_principal` (`emo_prof_cours_id`) USING BTREE,
  ADD KEY `emo_prof_bkp` (`emo_prof_td_id`) USING BTREE,
  ADD KEY `emo_p_prof_id` (`emo_prof_p_id`) USING BTREE,
  ADD KEY `emo_h_prof_id` (`emo_prof_h_id`) USING BTREE,
  ADD KEY `emo_visible_pv` (`emo_visible_pv`),
  ADD KEY `emo_est_enseigne` (`emo_est_enseigne`),
  ADD KEY `emo_last_id` (`emo_last_id`);

--
-- Indexes for table `n_encadrants_projets`
--
ALTER TABLE `n_encadrants_projets`
  ADD PRIMARY KEY (`ep_id`),
  ADD KEY `ep_prof_id` (`ep_prof_id`),
  ADD KEY `ep_emo_id` (`ep_emo_id`),
  ADD KEY `ep_gs_id` (`ep_gp_id`) USING BTREE;

--
-- Indexes for table `n_etudiants`
--
ALTER TABLE `n_etudiants`
  ADD PRIMARY KEY (`etud_id`),
  ADD KEY `etud_ville_id` (`etud_ville_id`),
  ADD KEY `etud_nat_id` (`etud_nat_id`),
  ADD KEY `etud_user_id` (`etud_user_id`);

--
-- Indexes for table `n_examens`
--
ALTER TABLE `n_examens`
  ADD PRIMARY KEY (`exam_id`),
  ADD KEY `exam_prof_id` (`exam_prof_id`),
  ADD KEY `exam_emo_id` (`exam_emo_id`),
  ADD KEY `exam_sem_id` (`exam_sem_id`),
  ADD KEY `exam_index` (`exam_index`),
  ADD KEY `exam_type_id` (`exam_type_id`),
  ADD KEY `exam_seance_id` (`exam_seance_id`),
  ADD KEY `exam_last_id` (`exam_last_id`),
  ADD KEY `exam_as_id` (`exam_as_id`),
  ADD KEY `exam_mode` (`exam_mode`);

--
-- Indexes for table `n_filieres`
--
ALTER TABLE `n_filieres`
  ADD PRIMARY KEY (`fil_id`),
  ADD UNIQUE KEY `fil_abbr` (`fil_abbr`),
  ADD KEY `fil_dom_id` (`fil_dom_id`);

--
-- Indexes for table `n_filiere_signataires`
--
ALTER TABLE `n_filiere_signataires`
  ADD PRIMARY KEY (`fs_id`),
  ADD KEY `fs_filiere_id` (`fs_filiere_id`),
  ADD KEY `fs_prof_id` (`fs_prof_id`),
  ADD KEY `fs_diplome_id` (`fs_diplome_id`);

--
-- Indexes for table `n_formations`
--
ALTER TABLE `n_formations`
  ADD PRIMARY KEY (`for_id`),
  ADD UNIQUE KEY `for_abbr_for_centre_id` (`for_abbr`,`for_centre_id`),
  ADD KEY `for_diplome_id` (`for_diplome_id`),
  ADD KEY `for_filiere_id` (`for_filiere_id`),
  ADD KEY `for_option_id` (`for_option_id`),
  ADD KEY `for_asdebut` (`for_asdebut`),
  ADD KEY `for_asfin` (`for_asfin`),
  ADD KEY `for_asdebut_eff` (`for_asdebut_eff`),
  ADD KEY `for_asfin_eff` (`for_asfin_eff`),
  ADD KEY `for_centre_id` (`for_centre_id`);

--
-- Indexes for table `n_fraisconvenu`
--
ALTER TABLE `n_fraisconvenu`
  ADD PRIMARY KEY (`fcv_id`),
  ADD KEY `fcv_ins_id` (`fcv_ins_id`),
  ADD KEY `fcv_typefrais_id` (`fcv_typefrais_id`),
  ADD KEY `fcv_modep_id` (`fcv_typeperiode_id`) USING BTREE;

--
-- Indexes for table `n_groupecritere_lignes`
--
ALTER TABLE `n_groupecritere_lignes`
  ADD PRIMARY KEY (`gcl_id`),
  ADD KEY `gcl_gc_id` (`gcl_gc_id`),
  ADD KEY `gcl_ca_id` (`gcl_ca_id`);

--
-- Indexes for table `n_groupement_diplomes`
--
ALTER TABLE `n_groupement_diplomes`
  ADD PRIMARY KEY (`gd_id`);

--
-- Indexes for table `n_groupes_criteres`
--
ALTER TABLE `n_groupes_criteres`
  ADD PRIMARY KEY (`gc_id`),
  ADD KEY `gc_clas_id` (`gc_clas_id`),
  ADD KEY `gc_nat_id` (`gc_nat_id`);

--
-- Indexes for table `n_groupes_projets`
--
ALTER TABLE `n_groupes_projets`
  ADD PRIMARY KEY (`gp_id`);

--
-- Indexes for table `n_inscriptions`
--
ALTER TABLE `n_inscriptions`
  ADD PRIMARY KEY (`ins_id`),
  ADD KEY `ins_etudiant_id` (`ins_etudiant_id`),
  ADD KEY `ins_adm_id` (`ins_adm_id`),
  ADD KEY `ins_classe_id` (`ins_classe_id`),
  ADD KEY `ins_as_id` (`ins_as_id`),
  ADD KEY `ins_statut_id` (`ins_statut_id`),
  ADD KEY `ins_tmp-id` (`ins_tmp_id`) USING BTREE,
  ADD KEY `ins_grp_id` (`ins_grp_id`),
  ADD KEY `ins_gp_id` (`ins_gp_id`);

--
-- Indexes for table `n_inscriptions_archive`
--
ALTER TABLE `n_inscriptions_archive`
  ADD PRIMARY KEY (`ins_id`),
  ADD KEY `ins_etudiant_id` (`ins_etudiant_id`),
  ADD KEY `ins_adm_id` (`ins_adm_id`),
  ADD KEY `ins_classe_id` (`ins_classe_id`),
  ADD KEY `ins_as_id` (`ins_as_id`),
  ADD KEY `ins_statut_id` (`ins_statut_id`),
  ADD KEY `ins_tmp-id` (`ins_tmp_id`) USING BTREE;

--
-- Indexes for table `n_inscription_sequence`
--
ALTER TABLE `n_inscription_sequence`
  ADD PRIMARY KEY (`inseq_id`) USING BTREE;

--
-- Indexes for table `n_job`
--
ALTER TABLE `n_job`
  ADD PRIMARY KEY (`job_id`);

--
-- Indexes for table `n_jours_feries`
--
ALTER TABLE `n_jours_feries`
  ADD PRIMARY KEY (`jf_id`),
  ADD KEY `jf_as_id` (`jf_as_id`);

--
-- Indexes for table `n_lignes_operation`
--
ALTER TABLE `n_lignes_operation`
  ADD PRIMARY KEY (`lop_id`),
  ADD KEY `lop_op_id` (`lop_op_id`),
  ADD KEY `lop_cs_id` (`lop_cs_id`),
  ADD KEY `lop_methpay_id` (`lop_methpay_id`),
  ADD KEY `lop_piece_id` (`lop_piece_id`);

--
-- Indexes for table `n_localites`
--
ALTER TABLE `n_localites`
  ADD PRIMARY KEY (`loc_id`);

--
-- Indexes for table `n_mail_list`
--
ALTER TABLE `n_mail_list`
  ADD PRIMARY KEY (`ml_id`);

--
-- Indexes for table `n_matieres`
--
ALTER TABLE `n_matieres`
  ADD PRIMARY KEY (`mat_id`),
  ADD KEY `matiere_fk1` (`mat_centre_id`);

--
-- Indexes for table `n_membres_jury`
--
ALTER TABLE `n_membres_jury`
  ADD PRIMARY KEY (`mj_id`) USING BTREE;

--
-- Indexes for table `n_menus`
--
ALTER TABLE `n_menus`
  ADD PRIMARY KEY (`menu_id`) USING BTREE,
  ADD KEY `menu_parent` (`menu_parent`);

--
-- Indexes for table `n_modeles_documents`
--
ALTER TABLE `n_modeles_documents`
  ADD PRIMARY KEY (`mdoc_id`),
  ADD KEY `mdoc_typedoc_id` (`mdoc_typedoc_id`),
  ADD KEY `mdoc_fk1` (`mdoc_centre_id`);

--
-- Indexes for table `n_modules`
--
ALTER TABLE `n_modules`
  ADD PRIMARY KEY (`mod_id`);

--
-- Indexes for table `n_niveaux`
--
ALTER TABLE `n_niveaux`
  ADD PRIMARY KEY (`niv_id`);

--
-- Indexes for table `n_nsti_criteres`
--
ALTER TABLE `n_nsti_criteres`
  ADD PRIMARY KEY (`nsti_crt_id`) USING BTREE,
  ADD UNIQUE KEY `nsti_crt_nom` (`nsti_crt_nom`);

--
-- Indexes for table `n_nsti_critere_notes`
--
ALTER TABLE `n_nsti_critere_notes`
  ADD PRIMARY KEY (`nsti_id`) USING BTREE,
  ADD KEY `idx_nsti_crt_id` (`nsti_crt_id`) USING BTREE,
  ADD KEY `idx_nsti_ins_id` (`nsti_ins_id`) USING BTREE;

--
-- Indexes for table `n_operations`
--
ALTER TABLE `n_operations`
  ADD PRIMARY KEY (`op_id`),
  ADD KEY `op_user_id` (`op_user_id`),
  ADD KEY `op_rb_id` (`op_rb_id`),
  ADD KEY `op_facture` (`op_facture`),
  ADD KEY `op_recu_id` (`op_recu_id`);

--
-- Indexes for table `n_options`
--
ALTER TABLE `n_options`
  ADD PRIMARY KEY (`opt_id`),
  ADD UNIQUE KEY `opt_abbr` (`opt_abbr`),
  ADD KEY `opt_filiere_id` (`opt_filiere_id`);

--
-- Indexes for table `n_periodes_convenues`
--
ALTER TABLE `n_periodes_convenues`
  ADD PRIMARY KEY (`pcv_id`),
  ADD KEY `pcv_periode_id` (`pcv_periode_id`),
  ADD KEY `pcv_fcv_id` (`pcv_fcv_id`);

--
-- Indexes for table `n_periodes_payees`
--
ALTER TABLE `n_periodes_payees`
  ADD PRIMARY KEY (`pp_id`),
  ADD KEY `pp_recu_id` (`pp_recu_id`),
  ADD KEY `pp_fcv_id` (`pp_pcv_id`) USING BTREE;

--
-- Indexes for table `n_permissions`
--
ALTER TABLE `n_permissions`
  ADD PRIMARY KEY (`perm_id`),
  ADD KEY `perm_menu_id` (`perm_menu_id`);

--
-- Indexes for table `n_personnel`
--
ALTER TABLE `n_personnel`
  ADD PRIMARY KEY (`dir_id`) USING BTREE,
  ADD KEY `pers_user_id` (`dir_user_id`) USING BTREE,
  ADD KEY `pers_ville_id` (`dir_ville_id`) USING BTREE;

--
-- Indexes for table `n_personnel_centres`
--
ALTER TABLE `n_personnel_centres`
  ADD PRIMARY KEY (`pc_id`),
  ADD KEY `pc_centre_id` (`pc_centre_id`),
  ADD KEY `pc_dir_id` (`pc_pers_id`) USING BTREE;

--
-- Indexes for table `n_pieces`
--
ALTER TABLE `n_pieces`
  ADD PRIMARY KEY (`pc_id`),
  ADD KEY `pc_type_id` (`pc_type_id`);

--
-- Indexes for table `n_preinscription_criteres`
--
ALTER TABLE `n_preinscription_criteres`
  ADD PRIMARY KEY (`pc_id`),
  ADD KEY `pc_sc_id` (`pc_sc_id`),
  ADD KEY `pc_preins_id` (`pc_preins_id`),
  ADD KEY `pc_chemin` (`pc_chemin`),
  ADD KEY `pc_gcl_id` (`pc_ca_id`) USING BTREE;

--
-- Indexes for table `n_preinscription_criteres_hist`
--
ALTER TABLE `n_preinscription_criteres_hist`
  ADD PRIMARY KEY (`pch_id`);

--
-- Indexes for table `n_preinsmail_list`
--
ALTER TABLE `n_preinsmail_list`
  ADD PRIMARY KEY (`prml_id`),
  ADD KEY `prml_ml_id` (`prml_ml_id`);

--
-- Indexes for table `n_pv_access`
--
ALTER TABLE `n_pv_access`
  ADD PRIMARY KEY (`pva_id`),
  ADD KEY `pva_diplome_id` (`pva_diplome_id`),
  ADD KEY `pva_niveau_filiere` (`pva_niveau_filiere`),
  ADD KEY `pva_mise_a_niveau` (`pva_mise_a_niveau`),
  ADD KEY `pva_modele_id` (`pva_modele_id`);

--
-- Indexes for table `n_pv_chemins`
--
ALTER TABLE `n_pv_chemins`
  ADD PRIMARY KEY (`pv_id`);

--
-- Indexes for table `n_pv_types`
--
ALTER TABLE `n_pv_types`
  ADD PRIMARY KEY (`pvt_id`) USING BTREE,
  ADD KEY `pvs_fk1` (`pvt_centre_id`) USING BTREE;

--
-- Indexes for table `n_recouvrements`
--
ALTER TABLE `n_recouvrements`
  ADD PRIMARY KEY (`rcv_id`),
  ADD KEY `rcv_ins_id` (`rcv_ins_id`),
  ADD KEY `rcv_user_id` (`rcv_user_id`);

--
-- Indexes for table `n_recouv_echeances`
--
ALTER TABLE `n_recouv_echeances`
  ADD PRIMARY KEY (`rce_id`),
  ADD KEY `rce_rcv_id` (`rce_rcv_id`),
  ADD KEY `rce_methpay_id` (`rce_methpay_id`),
  ADD KEY `rce_pp_id` (`rce_rp_id`) USING BTREE;

--
-- Indexes for table `n_recouv_periodes`
--
ALTER TABLE `n_recouv_periodes`
  ADD PRIMARY KEY (`rcp_id`),
  ADD KEY `rcp_rcv_id` (`rcp_rcv_id`),
  ADD KEY `rcp_pcv_id` (`rcp_pcv_id`);

--
-- Indexes for table `n_recus`
--
ALTER TABLE `n_recus`
  ADD PRIMARY KEY (`rec_id`),
  ADD KEY `rec_inscription_id` (`rec_inscription_id`),
  ADD KEY `rec_user_id` (`rec_user_id`);

--
-- Indexes for table `n_recu_paiements`
--
ALTER TABLE `n_recu_paiements`
  ADD PRIMARY KEY (`rp_id`),
  ADD KEY `rp_methpay_id` (`rp_methpay_id`),
  ADD KEY `rp_recu_id` (`rp_recu_id`),
  ADD KEY `rp_piece_id` (`rp_piece_id`);

--
-- Indexes for table `n_reductions`
--
ALTER TABLE `n_reductions`
  ADD PRIMARY KEY (`red_id`),
  ADD KEY `red_typereduction_id` (`red_typereduction_id`),
  ADD KEY `red_ins_id` (`red_fcv_id`) USING BTREE;

--
-- Indexes for table `n_resultats_admissions`
--
ALTER TABLE `n_resultats_admissions`
  ADD PRIMARY KEY (`ra_id`),
  ADD KEY `ra_adm_id` (`ra_adm_id`);

--
-- Indexes for table `n_resultats_inscriptions`
--
ALTER TABLE `n_resultats_inscriptions`
  ADD PRIMARY KEY (`ri_id`) USING BTREE,
  ADD KEY `rm_ins_id` (`ri_ins_id`) USING BTREE,
  ADD KEY `rm_statut_id` (`ri_statut_id`) USING BTREE,
  ADD KEY `rm_sem_id` (`ri_as_id`) USING BTREE;

--
-- Indexes for table `n_resultat_emo`
--
ALTER TABLE `n_resultat_emo`
  ADD PRIMARY KEY (`rn_id`) USING BTREE,
  ADD KEY `moy_emo_id` (`rn_emo_id`) USING BTREE,
  ADD KEY `moy_ins_id` (`rn_ins_id`) USING BTREE,
  ADD KEY `rn_sem_id` (`rn_sem_id`) USING BTREE;

--
-- Indexes for table `n_resultat_examen`
--
ALTER TABLE `n_resultat_examen`
  ADD PRIMARY KEY (`not_id`) USING BTREE,
  ADD KEY `not_ins_id` (`not_ins_id`) USING BTREE,
  ADD KEY `not_user_id` (`not_modif_par`) USING BTREE,
  ADD KEY `not_exam_id` (`not_exam_id`) USING BTREE,
  ADD KEY `not_statut_id` (`not_statut_id`) USING BTREE,
  ADD KEY `not_id_origine` (`not_id_origine`) USING BTREE,
  ADD KEY `not_est_calculer` (`not_est_calculer`) USING BTREE;

--
-- Indexes for table `n_roles`
--
ALTER TABLE `n_roles`
  ADD PRIMARY KEY (`role_id`) USING BTREE,
  ADD KEY `roles_fk1` (`role_centre_id`);

--
-- Indexes for table `n_role_permissions`
--
ALTER TABLE `n_role_permissions`
  ADD PRIMARY KEY (`rp_id`),
  ADD KEY `rp_role_id` (`rp_perm_id`) USING BTREE,
  ADD KEY `rp_perm_id` (`rp_role_id`) USING BTREE;

--
-- Indexes for table `n_rubriques_budgetaires`
--
ALTER TABLE `n_rubriques_budgetaires`
  ADD PRIMARY KEY (`rb_id`),
  ADD KEY `rb_parent_id` (`rb_parent_id`),
  ADD KEY `rb_as_id` (`rb_budget_id`) USING BTREE,
  ADD KEY `rb_type` (`rb_type`);

--
-- Indexes for table `n_salles`
--
ALTER TABLE `n_salles`
  ADD PRIMARY KEY (`salle_id`),
  ADD KEY `salle_site_id` (`salle_site_id`),
  ADD KEY `salle_type_id` (`salle_type_id`);

--
-- Indexes for table `n_seances`
--
ALTER TABLE `n_seances`
  ADD PRIMARY KEY (`se_id`),
  ADD KEY `se_uet_id` (`se_uet_id`),
  ADD KEY `se_statut_id` (`se_statut_id`),
  ADD KEY `se_type_edt_id` (`se_type_edt_id`),
  ADD KEY `se_emo_id` (`se_emo_id`),
  ADD KEY `se_edt_id` (`se_edt_id`),
  ADD KEY `se_prof_bkp_id` (`se_prof_bkp_id`),
  ADD KEY `se_prof_id` (`se_prof_id`);

--
-- Indexes for table `n_semestres`
--
ALTER TABLE `n_semestres`
  ADD PRIMARY KEY (`sem_id`),
  ADD KEY `sem_session_id` (`sem_session_id`),
  ADD KEY `sem_niveau_apresbac` (`sem_niveau_filiere`) USING BTREE;

--
-- Indexes for table `n_serie_bac`
--
ALTER TABLE `n_serie_bac`
  ADD PRIMARY KEY (`sb_id`),
  ADD KEY `sb_nom` (`sb_nom`);

--
-- Indexes for table `n_session`
--
ALTER TABLE `n_session`
  ADD PRIMARY KEY (`sess_id`);

--
-- Indexes for table `n_sites`
--
ALTER TABLE `n_sites`
  ADD PRIMARY KEY (`site_id`),
  ADD KEY `site_centre_id` (`site_centre_id`);

--
-- Indexes for table `n_statuts_criteres`
--
ALTER TABLE `n_statuts_criteres`
  ADD PRIMARY KEY (`sc_id`);

--
-- Indexes for table `n_statuts_demandes`
--
ALTER TABLE `n_statuts_demandes`
  ADD PRIMARY KEY (`ds_id`) USING BTREE;

--
-- Indexes for table `n_statuts_inscriptions`
--
ALTER TABLE `n_statuts_inscriptions`
  ADD PRIMARY KEY (`si_id`);

--
-- Indexes for table `n_statuts_seances`
--
ALTER TABLE `n_statuts_seances`
  ADD PRIMARY KEY (`ss_id`);

--
-- Indexes for table `n_statut_notes`
--
ALTER TABLE `n_statut_notes`
  ADD PRIMARY KEY (`stn_id`);

--
-- Indexes for table `n_suivi_demande`
--
ALTER TABLE `n_suivi_demande`
  ADD PRIMARY KEY (`sd_id`) USING BTREE;

--
-- Indexes for table `n_tmp_inscription`
--
ALTER TABLE `n_tmp_inscription`
  ADD PRIMARY KEY (`ins_id`);

--
-- Indexes for table `n_types_demandes`
--
ALTER TABLE `n_types_demandes`
  ADD PRIMARY KEY (`tdem_id`);

--
-- Indexes for table `n_types_details_calenders`
--
ALTER TABLE `n_types_details_calenders`
  ADD PRIMARY KEY (`dc_id`) USING BTREE,
  ADD KEY `dc_type_edt` (`dc_type_edt`) USING BTREE;

--
-- Indexes for table `n_types_documents`
--
ALTER TABLE `n_types_documents`
  ADD PRIMARY KEY (`tdoc_id`);

--
-- Indexes for table `n_types_examens`
--
ALTER TABLE `n_types_examens`
  ADD PRIMARY KEY (`tpe_id`);

--
-- Indexes for table `n_types_pieces`
--
ALTER TABLE `n_types_pieces`
  ADD PRIMARY KEY (`tpc_id`) USING BTREE,
  ADD UNIQUE KEY `mov_nom` (`tpc_nom`) USING BTREE,
  ADD KEY `tpc_methpay_id` (`tpc_methpay_id`);

--
-- Indexes for table `n_types_reclamation`
--
ALTER TABLE `n_types_reclamation`
  ADD PRIMARY KEY (`trec_id`) USING BTREE;

--
-- Indexes for table `n_types_reductions`
--
ALTER TABLE `n_types_reductions`
  ADD PRIMARY KEY (`tred_id`) USING BTREE;

--
-- Indexes for table `n_types_remarques`
--
ALTER TABLE `n_types_remarques`
  ADD PRIMARY KEY (`trem_id`);

--
-- Indexes for table `n_types_salles`
--
ALTER TABLE `n_types_salles`
  ADD PRIMARY KEY (`ts_id`);

--
-- Indexes for table `n_type_diplome`
--
ALTER TABLE `n_type_diplome`
  ADD PRIMARY KEY (`td_id`);

--
-- Indexes for table `n_type_edt`
--
ALTER TABLE `n_type_edt`
  ADD PRIMARY KEY (`edtype_id`),
  ADD KEY `edtype_exam_type_id` (`edtype_type_exam_id`) USING BTREE;

--
-- Indexes for table `n_utilisateurs`
--
ALTER TABLE `n_utilisateurs`
  ADD PRIMARY KEY (`user_id`),
  ADD KEY `user_role_id` (`user_role_id`),
  ADD KEY `user_ref_id` (`user_ref_id`),
  ADD KEY `centre_id` (`centre_id`);

--
-- Indexes for table `observation`
--
ALTER TABLE `observation`
  ADD PRIMARY KEY (`obs_id`);

--
-- Indexes for table `param`
--
ALTER TABLE `param`
  ADD PRIMARY KEY (`param_id`);

--
-- Indexes for table `parameter`
--
ALTER TABLE `parameter`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `partenaire`
--
ALTER TABLE `partenaire`
  ADD PRIMARY KEY (`par_id`) USING BTREE;

--
-- Indexes for table `pays`
--
ALTER TABLE `pays`
  ADD PRIMARY KEY (`pays_id`) USING BTREE,
  ADD UNIQUE KEY `alpha2` (`pays_alpha2`) USING BTREE,
  ADD UNIQUE KEY `alpha3` (`pays_alpha3`) USING BTREE;

--
-- Indexes for table `periodefrais`
--
ALTER TABLE `periodefrais`
  ADD PRIMARY KEY (`periode_id`),
  ADD KEY `periode_modep_id` (`periode_typeperiode_id`) USING BTREE;

--
-- Indexes for table `periodepayee`
--
ALTER TABLE `periodepayee`
  ADD PRIMARY KEY (`periodep_fraisconv_id`,`periodep_recuetud_id`);

--
-- Indexes for table `permission_context`
--
ALTER TABLE `permission_context`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `phase`
--
ALTER TABLE `phase`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `phase_condition`
--
ALTER TABLE `phase_condition`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `poste`
--
ALTER TABLE `poste`
  ADD PRIMARY KEY (`poste_id`);

--
-- Indexes for table `preinscription`
--
ALTER TABLE `preinscription`
  ADD PRIMARY KEY (`pre_id`),
  ADD KEY `pre_annee_id` (`pre_annee_id`),
  ADD KEY `pre_partenaire_id` (`pre_partenaire_id`),
  ADD KEY `pre_source` (`pre_source`),
  ADD KEY `pre_centre_id` (`pre_centre_id`),
  ADD KEY `pre_for_id` (`pre_for_id`),
  ADD KEY `pre_nat_id` (`pre_nat_id`),
  ADD KEY `pre_camp_id` (`pre_camp_id`),
  ADD KEY `pre_niv_id` (`pre_niv_id`),
  ADD KEY `pre_visiteur_id` (`pre_visiteur_id`),
  ADD KEY `pre_type_bac_id` (`pre_type_bac_id`),
  ADD KEY `pre_bac_pays_id` (`pre_bac_pays_id`),
  ADD KEY `pre_bac_ville_id` (`pre_bac_ville_id`),
  ADD KEY `pre_user_id` (`pre_user_id`),
  ADD KEY `pre_classe_id` (`pre_classe_id`);

--
-- Indexes for table `print_permissions`
--
ALTER TABLE `print_permissions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `prof`
--
ALTER TABLE `prof`
  ADD PRIMARY KEY (`prof_id`),
  ADD KEY `prof_user_id` (`prof_user_id`),
  ADD KEY `prof_ville_id` (`prof_ville_id`),
  ADD KEY `prof_type_pay` (`prof_type_pay`),
  ADD KEY `prof_fk1` (`prof_centre_id`);

--
-- Indexes for table `profile_options`
--
ALTER TABLE `profile_options`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `profile_permission`
--
ALTER TABLE `profile_permission`
  ADD PRIMARY KEY (`profile_perm_id`);

--
-- Indexes for table `profile_permission_utilisateur`
--
ALTER TABLE `profile_permission_utilisateur`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `prof_duree`
--
ALTER TABLE `prof_duree`
  ADD PRIMARY KEY (`pd_id`);

--
-- Indexes for table `prof_mdluser`
--
ALTER TABLE `prof_mdluser`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `prof_seance`
--
ALTER TABLE `prof_seance`
  ADD PRIMARY KEY (`ps_id`);

--
-- Indexes for table `prof_seance_remarque`
--
ALTER TABLE `prof_seance_remarque`
  ADD PRIMARY KEY (`psr_id`);

--
-- Indexes for table `releveimprimer`
--
ALTER TABLE `releveimprimer`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `releve_impression`
--
ALTER TABLE `releve_impression`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `remarque`
--
ALTER TABLE `remarque`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ins_id` (`ins_id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `type_id` (`type_id`);

--
-- Indexes for table `removed_diplome`
--
ALTER TABLE `removed_diplome`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `removed_filiere`
--
ALTER TABLE `removed_filiere`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `salle`
--
ALTER TABLE `salle`
  ADD PRIMARY KEY (`salle_id`);

--
-- Indexes for table `seance`
--
ALTER TABLE `seance`
  ADD PRIMARY KEY (`seance_id`);

--
-- Indexes for table `seance_collection`
--
ALTER TABLE `seance_collection`
  ADD PRIMARY KEY (`scol_id`);

--
-- Indexes for table `seance_commune`
--
ALTER TABLE `seance_commune`
  ADD PRIMARY KEY (`scom_id`);

--
-- Indexes for table `seance_contenu`
--
ALTER TABLE `seance_contenu`
  ADD PRIMARY KEY (`seance_contenu_id`);

--
-- Indexes for table `seance_demande`
--
ALTER TABLE `seance_demande`
  ADD PRIMARY KEY (`seadem_id`);

--
-- Indexes for table `seance_deroulement`
--
ALTER TABLE `seance_deroulement`
  ADD PRIMARY KEY (`seance_deroule_id`);

--
-- Indexes for table `secteur`
--
ALTER TABLE `secteur`
  ADD PRIMARY KEY (`secteur_id`);

--
-- Indexes for table `semestre`
--
ALTER TABLE `semestre`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `session`
--
ALTER TABLE `session`
  ADD PRIMARY KEY (`sess_id`);

--
-- Indexes for table `site`
--
ALTER TABLE `site`
  ADD PRIMARY KEY (`site_id`),
  ADD KEY `site_centre_id` (`site_centre_id`);

--
-- Indexes for table `sms`
--
ALTER TABLE `sms`
  ADD PRIMARY KEY (`sms_id`);

--
-- Indexes for table `societe`
--
ALTER TABLE `societe`
  ADD PRIMARY KEY (`societe_id`);

--
-- Indexes for table `stage`
--
ALTER TABLE `stage`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `suivre_laureat`
--
ALTER TABLE `suivre_laureat`
  ADD PRIMARY KEY (`suivre_id`);

--
-- Indexes for table `suppliers`
--
ALTER TABLE `suppliers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `supp_filiere`
--
ALTER TABLE `supp_filiere`
  ADD PRIMARY KEY (`filiere_id`);

--
-- Indexes for table `supp_filiere_bac`
--
ALTER TABLE `supp_filiere_bac`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `supp_inscription_tag`
--
ALTER TABLE `supp_inscription_tag`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tag`
--
ALTER TABLE `tag`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `trace`
--
ALTER TABLE `trace`
  ADD PRIMARY KEY (`trace_id`);

--
-- Indexes for table `traitement`
--
ALTER TABLE `traitement`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tuteur`
--
ALTER TABLE `tuteur`
  ADD PRIMARY KEY (`tut_id`);

--
-- Indexes for table `tuteur_etudiant`
--
ALTER TABLE `tuteur_etudiant`
  ADD PRIMARY KEY (`etud_id`,`tut_id`);

--
-- Indexes for table `typectr`
--
ALTER TABLE `typectr`
  ADD PRIMARY KEY (`typectr_id`);

--
-- Indexes for table `typeformation`
--
ALTER TABLE `typeformation`
  ADD PRIMARY KEY (`typeformation_id`);

--
-- Indexes for table `typefrais`
--
ALTER TABLE `typefrais`
  ADD PRIMARY KEY (`tpf_id`) USING BTREE,
  ADD KEY `typefrais_modep_id` (`tpf_typeperiode_id`) USING BTREE,
  ADD KEY `tpf_code` (`tpf_code`);

--
-- Indexes for table `typeperiodefrais`
--
ALTER TABLE `typeperiodefrais`
  ADD PRIMARY KEY (`tp_id`) USING BTREE;

--
-- Indexes for table `type_bac`
--
ALTER TABLE `type_bac`
  ADD PRIMARY KEY (`tb_id`) USING BTREE;

--
-- Indexes for table `type_diplome_access`
--
ALTER TABLE `type_diplome_access`
  ADD PRIMARY KEY (`type_id`) USING BTREE;

--
-- Indexes for table `type_releve`
--
ALTER TABLE `type_releve`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`);

--
-- Indexes for table `user_fiche`
--
ALTER TABLE `user_fiche`
  ADD PRIMARY KEY (`userfiche_id`);

--
-- Indexes for table `user_menu`
--
ALTER TABLE `user_menu`
  ADD PRIMARY KEY (`um_id`);

--
-- Indexes for table `utilisateur`
--
ALTER TABLE `utilisateur`
  ADD PRIMARY KEY (`user_id`);

--
-- Indexes for table `utilisateur_departement`
--
ALTER TABLE `utilisateur_departement`
  ADD PRIMARY KEY (`userdepart_id`) USING BTREE,
  ADD KEY `userdepart_user_id` (`userdepart_user_id`),
  ADD KEY `userdepart_depart_id` (`userdepart_depart_id`);

--
-- Indexes for table `utilisateur_permission`
--
ALTER TABLE `utilisateur_permission`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ville`
--
ALTER TABLE `ville`
  ADD PRIMARY KEY (`vil_id`) USING BTREE;

--
-- Indexes for table `visiteur`
--
ALTER TABLE `visiteur`
  ADD PRIMARY KEY (`id`),
  ADD KEY `nom` (`nom`),
  ADD KEY `prenom` (`prenom`),
  ADD KEY `tel` (`tel`),
  ADD KEY `etudiant_id` (`etudiant_id`),
  ADD KEY `camp_id` (`camp_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `absenceetudiant`
--
ALTER TABLE `absenceetudiant`
  MODIFY `absetud_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `absenceprof`
--
ALTER TABLE `absenceprof`
  MODIFY `absprof_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `accueil`
--
ALTER TABLE `accueil`
  MODIFY `acc_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `attachement`
--
ALTER TABLE `attachement`
  MODIFY `att_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `attestation`
--
ALTER TABLE `attestation`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `attestation_generer`
--
ALTER TABLE `attestation_generer`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `backup_resultat_exam`
--
ALTER TABLE `backup_resultat_exam`
  MODIFY `bk_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `banques`
--
ALTER TABLE `banques`
  MODIFY `bnk_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `centre`
--
ALTER TABLE `centre`
  MODIFY `ct_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `classe`
--
ALTER TABLE `classe`
  MODIFY `classe_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `classe_cohort`
--
ALTER TABLE `classe_cohort`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `classe_typereleve`
--
ALTER TABLE `classe_typereleve`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ctr`
--
ALTER TABLE `ctr`
  MODIFY `ctr_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ctrmm`
--
ALTER TABLE `ctrmm`
  MODIFY `ctrmm_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `demande`
--
ALTER TABLE `demande`
  MODIFY `demande_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `demande_statut`
--
ALTER TABLE `demande_statut`
  MODIFY `ds_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `departement`
--
ALTER TABLE `departement`
  MODIFY `depart_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `departement_classe`
--
ALTER TABLE `departement_classe`
  MODIFY `departclasse_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `depense`
--
ALTER TABLE `depense`
  MODIFY `depense_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `depenses`
--
ALTER TABLE `depenses`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `depense_details`
--
ALTER TABLE `depense_details`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `dep_ben`
--
ALTER TABLE `dep_ben`
  MODIFY `db_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `dep_log`
--
ALTER TABLE `dep_log`
  MODIFY `dl_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `dep_ref`
--
ALTER TABLE `dep_ref`
  MODIFY `dep_ref_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `destinataire_sms`
--
ALTER TABLE `destinataire_sms`
  MODIFY `ds_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `details_calendrier_pedagogique`
--
ALTER TABLE `details_calendrier_pedagogique`
  MODIFY `Det_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `devoir`
--
ALTER TABLE `devoir`
  MODIFY `dev_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `devoiretud`
--
ALTER TABLE `devoiretud`
  MODIFY `devetud_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `direction`
--
ALTER TABLE `direction`
  MODIFY `dir_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `emploitemps`
--
ALTER TABLE `emploitemps`
  MODIFY `emploi_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `etudiant`
--
ALTER TABLE `etudiant`
  MODIFY `etud_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `etudiants_option`
--
ALTER TABLE `etudiants_option`
  MODIFY `etudopt_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `etudiant_document`
--
ALTER TABLE `etudiant_document`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `etudiant_inscription`
--
ALTER TABLE `etudiant_inscription`
  MODIFY `ins_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `etudiant_mdluser`
--
ALTER TABLE `etudiant_mdluser`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `etud_abs`
--
ALTER TABLE `etud_abs`
  MODIFY `absetud_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `etud_log`
--
ALTER TABLE `etud_log`
  MODIFY `el_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `etud_obs`
--
ALTER TABLE `etud_obs`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `etud_remarque`
--
ALTER TABLE `etud_remarque`
  MODIFY `er_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `evenement`
--
ALTER TABLE `evenement`
  MODIFY `even_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `fiche`
--
ALTER TABLE `fiche`
  MODIFY `fiche_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `file_upload_permessions`
--
ALTER TABLE `file_upload_permessions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `filiere`
--
ALTER TABLE `filiere`
  MODIFY `fil_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `filiere_bac`
--
ALTER TABLE `filiere_bac`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `formation_deroulement`
--
ALTER TABLE `formation_deroulement`
  MODIFY `form_der_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `garant_financiere`
--
ALTER TABLE `garant_financiere`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `groupes`
--
ALTER TABLE `groupes`
  MODIFY `grp_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `historique_log`
--
ALTER TABLE `historique_log`
  MODIFY `log_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `inscription`
--
ALTER TABLE `inscription`
  MODIFY `ins_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `inscription_demande`
--
ALTER TABLE `inscription_demande`
  MODIFY `insdem_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `inscription_demande_remarque`
--
ALTER TABLE `inscription_demande_remarque`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `inscription_document`
--
ALTER TABLE `inscription_document`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `inscription_option`
--
ALTER TABLE `inscription_option`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `inscription_tag`
--
ALTER TABLE `inscription_tag`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `langue_niveau`
--
ALTER TABLE `langue_niveau`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `mail`
--
ALTER TABLE `mail`
  MODIFY `mail_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `mailatt`
--
ALTER TABLE `mailatt`
  MODIFY `mailatt_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `matiere`
--
ALTER TABLE `matiere`
  MODIFY `mat_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `menu`
--
ALTER TABLE `menu`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `methodepayement`
--
ALTER TABLE `methodepayement`
  MODIFY `methpay_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `modmat`
--
ALTER TABLE `modmat`
  MODIFY `mm_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `module`
--
ALTER TABLE `module`
  MODIFY `mod_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `mois`
--
ALTER TABLE `mois`
  MODIFY `mois_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `moyenne_emo`
--
ALTER TABLE `moyenne_emo`
  MODIFY `moy_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `nationalite`
--
ALTER TABLE `nationalite`
  MODIFY `nat_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `notde`
--
ALTER TABLE `notde`
  MODIFY `notde_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `note`
--
ALTER TABLE `note`
  MODIFY `note_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `notep`
--
ALTER TABLE `notep`
  MODIFY `note_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `notifications`
--
ALTER TABLE `notifications`
  MODIFY `not_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_absences`
--
ALTER TABLE `n_absences`
  MODIFY `abs_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_admissions`
--
ALTER TABLE `n_admissions`
  MODIFY `adm_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_admission_diplome`
--
ALTER TABLE `n_admission_diplome`
  MODIFY `dip_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_admission_miseaniveau`
--
ALTER TABLE `n_admission_miseaniveau`
  MODIFY `am_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_batch`
--
ALTER TABLE `n_batch`
  MODIFY `bat_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_budgets`
--
ALTER TABLE `n_budgets`
  MODIFY `bud_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_cahier_text`
--
ALTER TABLE `n_cahier_text`
  MODIFY `cht_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_calendrier_pedagogiques`
--
ALTER TABLE `n_calendrier_pedagogiques`
  MODIFY `cal_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_centre_formations`
--
ALTER TABLE `n_centre_formations`
  MODIFY `cfm_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_centre_param`
--
ALTER TABLE `n_centre_param`
  MODIFY `cp_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_comptes_societe`
--
ALTER TABLE `n_comptes_societe`
  MODIFY `cs_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_criteres_access`
--
ALTER TABLE `n_criteres_access`
  MODIFY `ca_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_deliberations`
--
ALTER TABLE `n_deliberations`
  MODIFY `del_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_demandes`
--
ALTER TABLE `n_demandes`
  MODIFY `dem_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_demande_commentaires`
--
ALTER TABLE `n_demande_commentaires`
  MODIFY `cd_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_diplomes`
--
ALTER TABLE `n_diplomes`
  MODIFY `dip_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_diplomes_acces`
--
ALTER TABLE `n_diplomes_acces`
  MODIFY `da_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_diplome_document`
--
ALTER TABLE `n_diplome_document`
  MODIFY `dd_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_domaines`
--
ALTER TABLE `n_domaines`
  MODIFY `dom_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_edt`
--
ALTER TABLE `n_edt`
  MODIFY `edt_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_edt_unites`
--
ALTER TABLE `n_edt_unites`
  MODIFY `uet_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_elements_modules`
--
ALTER TABLE `n_elements_modules`
  MODIFY `emo_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_encadrants_projets`
--
ALTER TABLE `n_encadrants_projets`
  MODIFY `ep_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_etudiants`
--
ALTER TABLE `n_etudiants`
  MODIFY `etud_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_examens`
--
ALTER TABLE `n_examens`
  MODIFY `exam_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_filieres`
--
ALTER TABLE `n_filieres`
  MODIFY `fil_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_filiere_signataires`
--
ALTER TABLE `n_filiere_signataires`
  MODIFY `fs_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_formations`
--
ALTER TABLE `n_formations`
  MODIFY `for_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_fraisconvenu`
--
ALTER TABLE `n_fraisconvenu`
  MODIFY `fcv_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_groupecritere_lignes`
--
ALTER TABLE `n_groupecritere_lignes`
  MODIFY `gcl_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_groupement_diplomes`
--
ALTER TABLE `n_groupement_diplomes`
  MODIFY `gd_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_groupes_criteres`
--
ALTER TABLE `n_groupes_criteres`
  MODIFY `gc_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_groupes_projets`
--
ALTER TABLE `n_groupes_projets`
  MODIFY `gp_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_inscriptions`
--
ALTER TABLE `n_inscriptions`
  MODIFY `ins_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_inscription_sequence`
--
ALTER TABLE `n_inscription_sequence`
  MODIFY `inseq_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_job`
--
ALTER TABLE `n_job`
  MODIFY `job_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_jours_feries`
--
ALTER TABLE `n_jours_feries`
  MODIFY `jf_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_lignes_operation`
--
ALTER TABLE `n_lignes_operation`
  MODIFY `lop_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_localites`
--
ALTER TABLE `n_localites`
  MODIFY `loc_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_mail_list`
--
ALTER TABLE `n_mail_list`
  MODIFY `ml_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_matieres`
--
ALTER TABLE `n_matieres`
  MODIFY `mat_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_menus`
--
ALTER TABLE `n_menus`
  MODIFY `menu_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_modeles_documents`
--
ALTER TABLE `n_modeles_documents`
  MODIFY `mdoc_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_modules`
--
ALTER TABLE `n_modules`
  MODIFY `mod_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_nsti_criteres`
--
ALTER TABLE `n_nsti_criteres`
  MODIFY `nsti_crt_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_nsti_critere_notes`
--
ALTER TABLE `n_nsti_critere_notes`
  MODIFY `nsti_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_operations`
--
ALTER TABLE `n_operations`
  MODIFY `op_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_options`
--
ALTER TABLE `n_options`
  MODIFY `opt_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_periodes_convenues`
--
ALTER TABLE `n_periodes_convenues`
  MODIFY `pcv_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_periodes_payees`
--
ALTER TABLE `n_periodes_payees`
  MODIFY `pp_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_permissions`
--
ALTER TABLE `n_permissions`
  MODIFY `perm_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_personnel`
--
ALTER TABLE `n_personnel`
  MODIFY `dir_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_personnel_centres`
--
ALTER TABLE `n_personnel_centres`
  MODIFY `pc_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_pieces`
--
ALTER TABLE `n_pieces`
  MODIFY `pc_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_preinscription_criteres`
--
ALTER TABLE `n_preinscription_criteres`
  MODIFY `pc_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_preinscription_criteres_hist`
--
ALTER TABLE `n_preinscription_criteres_hist`
  MODIFY `pch_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_preinsmail_list`
--
ALTER TABLE `n_preinsmail_list`
  MODIFY `prml_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_pv_access`
--
ALTER TABLE `n_pv_access`
  MODIFY `pva_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_pv_chemins`
--
ALTER TABLE `n_pv_chemins`
  MODIFY `pv_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_pv_types`
--
ALTER TABLE `n_pv_types`
  MODIFY `pvt_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_recouvrements`
--
ALTER TABLE `n_recouvrements`
  MODIFY `rcv_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_recouv_echeances`
--
ALTER TABLE `n_recouv_echeances`
  MODIFY `rce_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_recouv_periodes`
--
ALTER TABLE `n_recouv_periodes`
  MODIFY `rcp_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_recus`
--
ALTER TABLE `n_recus`
  MODIFY `rec_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_recu_paiements`
--
ALTER TABLE `n_recu_paiements`
  MODIFY `rp_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_reductions`
--
ALTER TABLE `n_reductions`
  MODIFY `red_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_resultats_admissions`
--
ALTER TABLE `n_resultats_admissions`
  MODIFY `ra_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_resultats_inscriptions`
--
ALTER TABLE `n_resultats_inscriptions`
  MODIFY `ri_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_resultat_emo`
--
ALTER TABLE `n_resultat_emo`
  MODIFY `rn_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_resultat_examen`
--
ALTER TABLE `n_resultat_examen`
  MODIFY `not_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_roles`
--
ALTER TABLE `n_roles`
  MODIFY `role_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_role_permissions`
--
ALTER TABLE `n_role_permissions`
  MODIFY `rp_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_rubriques_budgetaires`
--
ALTER TABLE `n_rubriques_budgetaires`
  MODIFY `rb_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_salles`
--
ALTER TABLE `n_salles`
  MODIFY `salle_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_seances`
--
ALTER TABLE `n_seances`
  MODIFY `se_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_serie_bac`
--
ALTER TABLE `n_serie_bac`
  MODIFY `sb_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_session`
--
ALTER TABLE `n_session`
  MODIFY `sess_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_sites`
--
ALTER TABLE `n_sites`
  MODIFY `site_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_statuts_criteres`
--
ALTER TABLE `n_statuts_criteres`
  MODIFY `sc_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_statuts_demandes`
--
ALTER TABLE `n_statuts_demandes`
  MODIFY `ds_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_statuts_inscriptions`
--
ALTER TABLE `n_statuts_inscriptions`
  MODIFY `si_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_statuts_seances`
--
ALTER TABLE `n_statuts_seances`
  MODIFY `ss_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_suivi_demande`
--
ALTER TABLE `n_suivi_demande`
  MODIFY `sd_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_tmp_inscription`
--
ALTER TABLE `n_tmp_inscription`
  MODIFY `ins_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_types_demandes`
--
ALTER TABLE `n_types_demandes`
  MODIFY `tdem_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_types_details_calenders`
--
ALTER TABLE `n_types_details_calenders`
  MODIFY `dc_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_types_documents`
--
ALTER TABLE `n_types_documents`
  MODIFY `tdoc_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_types_examens`
--
ALTER TABLE `n_types_examens`
  MODIFY `tpe_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_types_pieces`
--
ALTER TABLE `n_types_pieces`
  MODIFY `tpc_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_types_reclamation`
--
ALTER TABLE `n_types_reclamation`
  MODIFY `trec_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_types_reductions`
--
ALTER TABLE `n_types_reductions`
  MODIFY `tred_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_types_remarques`
--
ALTER TABLE `n_types_remarques`
  MODIFY `trem_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_types_salles`
--
ALTER TABLE `n_types_salles`
  MODIFY `ts_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_type_diplome`
--
ALTER TABLE `n_type_diplome`
  MODIFY `td_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_type_edt`
--
ALTER TABLE `n_type_edt`
  MODIFY `edtype_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `n_utilisateurs`
--
ALTER TABLE `n_utilisateurs`
  MODIFY `user_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `observation`
--
ALTER TABLE `observation`
  MODIFY `obs_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `param`
--
ALTER TABLE `param`
  MODIFY `param_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `parameter`
--
ALTER TABLE `parameter`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `partenaire`
--
ALTER TABLE `partenaire`
  MODIFY `par_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `pays`
--
ALTER TABLE `pays`
  MODIFY `pays_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `periodefrais`
--
ALTER TABLE `periodefrais`
  MODIFY `periode_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `permission_context`
--
ALTER TABLE `permission_context`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `phase`
--
ALTER TABLE `phase`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `phase_condition`
--
ALTER TABLE `phase_condition`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `poste`
--
ALTER TABLE `poste`
  MODIFY `poste_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `preinscription`
--
ALTER TABLE `preinscription`
  MODIFY `pre_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `print_permissions`
--
ALTER TABLE `print_permissions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `prof`
--
ALTER TABLE `prof`
  MODIFY `prof_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `profile_options`
--
ALTER TABLE `profile_options`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `profile_permission`
--
ALTER TABLE `profile_permission`
  MODIFY `profile_perm_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `profile_permission_utilisateur`
--
ALTER TABLE `profile_permission_utilisateur`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `prof_duree`
--
ALTER TABLE `prof_duree`
  MODIFY `pd_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `prof_mdluser`
--
ALTER TABLE `prof_mdluser`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `prof_seance`
--
ALTER TABLE `prof_seance`
  MODIFY `ps_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `prof_seance_remarque`
--
ALTER TABLE `prof_seance_remarque`
  MODIFY `psr_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `releveimprimer`
--
ALTER TABLE `releveimprimer`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `releve_impression`
--
ALTER TABLE `releve_impression`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `remarque`
--
ALTER TABLE `remarque`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `removed_diplome`
--
ALTER TABLE `removed_diplome`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `removed_filiere`
--
ALTER TABLE `removed_filiere`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `salle`
--
ALTER TABLE `salle`
  MODIFY `salle_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `seance`
--
ALTER TABLE `seance`
  MODIFY `seance_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `seance_collection`
--
ALTER TABLE `seance_collection`
  MODIFY `scol_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `seance_commune`
--
ALTER TABLE `seance_commune`
  MODIFY `scom_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `seance_contenu`
--
ALTER TABLE `seance_contenu`
  MODIFY `seance_contenu_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `seance_demande`
--
ALTER TABLE `seance_demande`
  MODIFY `seadem_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `seance_deroulement`
--
ALTER TABLE `seance_deroulement`
  MODIFY `seance_deroule_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `secteur`
--
ALTER TABLE `secteur`
  MODIFY `secteur_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `semestre`
--
ALTER TABLE `semestre`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `session`
--
ALTER TABLE `session`
  MODIFY `sess_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `site`
--
ALTER TABLE `site`
  MODIFY `site_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sms`
--
ALTER TABLE `sms`
  MODIFY `sms_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `societe`
--
ALTER TABLE `societe`
  MODIFY `societe_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stage`
--
ALTER TABLE `stage`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `suivre_laureat`
--
ALTER TABLE `suivre_laureat`
  MODIFY `suivre_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `suppliers`
--
ALTER TABLE `suppliers`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `supp_filiere`
--
ALTER TABLE `supp_filiere`
  MODIFY `filiere_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `supp_filiere_bac`
--
ALTER TABLE `supp_filiere_bac`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `supp_inscription_tag`
--
ALTER TABLE `supp_inscription_tag`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tag`
--
ALTER TABLE `tag`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `trace`
--
ALTER TABLE `trace`
  MODIFY `trace_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `traitement`
--
ALTER TABLE `traitement`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tuteur`
--
ALTER TABLE `tuteur`
  MODIFY `tut_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `typectr`
--
ALTER TABLE `typectr`
  MODIFY `typectr_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `typeformation`
--
ALTER TABLE `typeformation`
  MODIFY `typeformation_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `typefrais`
--
ALTER TABLE `typefrais`
  MODIFY `tpf_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `typeperiodefrais`
--
ALTER TABLE `typeperiodefrais`
  MODIFY `tp_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `type_bac`
--
ALTER TABLE `type_bac`
  MODIFY `tb_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `type_diplome_access`
--
ALTER TABLE `type_diplome_access`
  MODIFY `type_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `type_releve`
--
ALTER TABLE `type_releve`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `user_fiche`
--
ALTER TABLE `user_fiche`
  MODIFY `userfiche_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `user_menu`
--
ALTER TABLE `user_menu`
  MODIFY `um_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `utilisateur`
--
ALTER TABLE `utilisateur`
  MODIFY `user_id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `utilisateur_departement`
--
ALTER TABLE `utilisateur_departement`
  MODIFY `userdepart_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `utilisateur_permission`
--
ALTER TABLE `utilisateur_permission`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ville`
--
ALTER TABLE `ville`
  MODIFY `vil_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `visiteur`
--
ALTER TABLE `visiteur`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `n_admission_diplome`
--
ALTER TABLE `n_admission_diplome`
  ADD CONSTRAINT `fk_dip_annee_id` FOREIGN KEY (`dip_annee_id`) REFERENCES `anneescolaire` (`annee_id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_dip_ins_id` FOREIGN KEY (`dip_adm_id`) REFERENCES `n_admissions` (`adm_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `n_centre_param`
--
ALTER TABLE `n_centre_param`
  ADD CONSTRAINT `centre_param_fk1` FOREIGN KEY (`cp_centre_id`) REFERENCES `centre` (`ct_id`);

--
-- Constraints for table `n_nsti_critere_notes`
--
ALTER TABLE `n_nsti_critere_notes`
  ADD CONSTRAINT `fk_nsti_critere` FOREIGN KEY (`nsti_crt_id`) REFERENCES `n_nsti_criteres` (`nsti_crt_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_nsti_ins` FOREIGN KEY (`nsti_ins_id`) REFERENCES `n_inscriptions` (`ins_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `n_resultats_admissions`
--
ALTER TABLE `n_resultats_admissions`
  ADD CONSTRAINT `n_resultats_admissions_ibfk_1` FOREIGN KEY (`ra_adm_id`) REFERENCES `n_admissions` (`adm_id`) ON DELETE CASCADE;

--
-- Constraints for table `n_roles`
--
ALTER TABLE `n_roles`
  ADD CONSTRAINT `roles_fk1` FOREIGN KEY (`role_centre_id`) REFERENCES `centre` (`ct_id`);

--
-- Constraints for table `prof`
--
ALTER TABLE `prof`
  ADD CONSTRAINT `prof_fk1` FOREIGN KEY (`prof_centre_id`) REFERENCES `centre` (`ct_id`);
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
