-- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Mer 23 Février 2011 à 10:56
-- Version du serveur: 5.1.41
-- Version de PHP: 5.3.1

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Base de données: `letterbox_trunk`
--

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

--
-- Structure de la table `arboxes`
--

CREATE TABLE IF NOT EXISTS `arboxes` (
  `ARBOX_ID` varchar(32) NOT NULL DEFAULT '',
  `TITLE` varchar(255) DEFAULT NULL,
  `SUBJECT` varchar(255) DEFAULT NULL,
  `DESCRIPTION` text,
  `ARCONTAINER_ID` varchar(32) DEFAULT NULL,
  `STATUS` varchar(3) NOT NULL DEFAULT '',
  `CREATION_DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `RETENTION_TIME` datetime DEFAULT '0000-00-00 00:00:00',
  `CUSTOM_T1` varchar(3) DEFAULT NULL,
  `CUSTOM_N1` int(255) DEFAULT '0',
  `CUSTOM_F1` float DEFAULT '0',
  `CUSTOM_D1` datetime DEFAULT '0000-00-00 00:00:00',
  `CUSTOM_T2` varchar(3) DEFAULT NULL,
  `CUSTOM_N2` int(255) DEFAULT '0',
  `CUSTOM_F2` float DEFAULT '0',
  `CUSTOM_D2` datetime DEFAULT '0000-00-00 00:00:00',
  `CUSTOM_T3` varchar(50) DEFAULT NULL,
  `CUSTOM_N3` int(255) DEFAULT '0',
  `CUSTOM_F3` float DEFAULT '0',
  `CUSTOM_D3` datetime DEFAULT '0000-00-00 00:00:00',
  `CUSTOM_T4` varchar(50) DEFAULT NULL,
  `CUSTOM_N4` int(255) DEFAULT '0',
  `CUSTOM_F4` float DEFAULT '0',
  `CUSTOM_D4` datetime DEFAULT '0000-00-00 00:00:00',
  `CUSTOM_T5` varchar(255) DEFAULT NULL,
  `CUSTOM_N5` int(255) DEFAULT '0',
  `CUSTOM_F5` float DEFAULT '0',
  `CUSTOM_D5` datetime DEFAULT '0000-00-00 00:00:00',
  `CUSTOM_T6` varchar(255) DEFAULT NULL,
  `CUSTOM_T7` varchar(255) DEFAULT NULL,
  `CUSTOM_T8` varchar(255) DEFAULT NULL,
  `CUSTOM_T9` varchar(255) DEFAULT NULL,
  `CUSTOM_T10` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ARBOX_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Archive box (about 500 sheets)';

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

--
-- Structure de la table `arcontainers`
--

CREATE TABLE IF NOT EXISTS `arcontainers` (
  `ARCONTAINER_ID` varchar(32) NOT NULL DEFAULT '',
  `TITLE` varchar(255) DEFAULT NULL,
  `SUBJECT` text,
  `DESCRIPTION` text,
  `STATUS` varchar(3) NOT NULL DEFAULT '',
  `STORAGE_ID` varchar(32) DEFAULT NULL,
  `ADDRESS` varchar(255) DEFAULT NULL,
  `CREATION_DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `RETENTION_TIME` datetime DEFAULT '0000-00-00 00:00:00',
  `CUSTOM_T1` varchar(50) DEFAULT NULL,
  `CUSTOM_N1` int(255) DEFAULT '0',
  `CUSTOM_F1` float DEFAULT '0',
  `CUSTOM_D1` datetime DEFAULT '0000-00-00 00:00:00',
  `CUSTOM_T2` varchar(3) DEFAULT NULL,
  `CUSTOM_N2` int(255) DEFAULT '0',
  `CUSTOM_F2` float DEFAULT '0',
  `CUSTOM_D2` datetime DEFAULT '0000-00-00 00:00:00',
  `CUSTOM_T3` varchar(255) DEFAULT NULL,
  `CUSTOM_N3` int(255) DEFAULT '0',
  `CUSTOM_F3` float DEFAULT '0',
  `CUSTOM_D3` datetime DEFAULT '0000-00-00 00:00:00',
  `CUSTOM_T4` varchar(255) DEFAULT NULL,
  `CUSTOM_N4` int(255) DEFAULT '0',
  `CUSTOM_F4` float DEFAULT '0',
  `CUSTOM_D4` datetime DEFAULT '0000-00-00 00:00:00',
  `CUSTOM_T5` varchar(255) DEFAULT NULL,
  `CUSTOM_N5` int(255) DEFAULT '0',
  `CUSTOM_F5` float DEFAULT '0',
  `CUSTOM_D5` datetime DEFAULT '0000-00-00 00:00:00',
  `CUSTOM_T6` varchar(255) DEFAULT NULL,
  `CUSTOM_T7` varchar(255) DEFAULT NULL,
  `CUSTOM_T8` varchar(255) DEFAULT NULL,
  `CUSTOM_T9` varchar(255) DEFAULT NULL,
  `CUSTOM_T10` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ARCONTAINER_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Archive container (usually 5 archive boxes)';

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

--
-- Structure de la table `assoc_street_quarter_communes`
--

CREATE TABLE IF NOT EXISTS `assoc_street_quarter_communes` (
  `STREET_ID` int(8) NOT NULL,
  `QUARTER_ID` int(8) NOT NULL DEFAULT '0',
  `COMMUNE_ID` varchar(11) COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`STREET_ID`,`QUARTER_ID`,`COMMUNE_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Structure de la table `authors`
--

CREATE TABLE IF NOT EXISTS `authors` (
  `AUTHOR_ID` varchar(32) NOT NULL DEFAULT '',
  `FIRSTNAME` varchar(255) DEFAULT NULL,
  `LASTNAME` varchar(255) DEFAULT NULL,
  `ENABLED` char(1) DEFAULT 'Y',
  `CUSTOM_T1` text,
  `CUSTOM_T2` varchar(255) DEFAULT NULL,
  `CUSTOM_T3` varchar(255) DEFAULT NULL,
  `CUSTOM_T4` varchar(255) DEFAULT NULL,
  `CUSTOM_T5` varchar(255) DEFAULT NULL,
  `CUSTOM_T6` varchar(255) DEFAULT NULL,
  `CUSTOM_T7` varchar(255) DEFAULT NULL,
  `CUSTOM_T8` varchar(255) DEFAULT NULL,
  `CUSTOM_T9` varchar(255) DEFAULT NULL,
  `CUSTOM_T10` varchar(255) DEFAULT NULL,
  `CUSTOM_D1` datetime DEFAULT NULL,
  `CUSTOM_N1` double DEFAULT NULL,
  PRIMARY KEY (`AUTHOR_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Authors or creators of the resource';

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

--
-- Structure de la table `baskets`
--

CREATE TABLE IF NOT EXISTS `baskets` (
  `RES_TABLE` varchar(255) NOT NULL DEFAULT '',
  `BASKET_ID` varchar(32) NOT NULL DEFAULT '',
  `BASKET_NAME` varchar(32) NOT NULL,
  `BASKET_DESC` varchar(255) NOT NULL DEFAULT '',
  `BASKET_SELECT` text NOT NULL,
  `BASKET_CLAUSE` text NOT NULL,
  `BASKET_GROUP_BY` text,
  `BASKET_ORDER_BY` text,
  `BASKET_LIMIT` text,
  `IS_GENERIC` char(1) NOT NULL DEFAULT 'N',
  `ENABLED` char(1) NOT NULL DEFAULT 'Y',
  `IS_GLOBAL` varchar(1) NOT NULL DEFAULT 'N',
  `LOCK_TIME` varchar(3) DEFAULT NULL,
  `IS_LOCKABLE` varchar(1) NOT NULL DEFAULT 'N',
  `GDD_BASKET` varchar(1) NOT NULL DEFAULT 'N',
  `OTHER_LINK` varchar(1) NOT NULL DEFAULT 'N',
  PRIMARY KEY (`RES_TABLE`,`BASKET_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la table `baskets_migration`
--

CREATE TABLE IF NOT EXISTS `baskets_migration` (
  `RES_TABLE` varchar(255) NOT NULL DEFAULT '',
  `BASKET_ID` varchar(32) NOT NULL DEFAULT '',
  `BASKET_NAME` varchar(32) NOT NULL,
  `BASKET_DESC` varchar(255) NOT NULL DEFAULT '',
  `BASKET_SELECT` text NOT NULL,
  `BASKET_CLAUSE` text NOT NULL,
  `BASKET_GROUP_BY` text,
  `BASKET_ORDER_BY` text,
  `BASKET_LIMIT` text,
  `IS_GENERIC` char(1) NOT NULL DEFAULT 'N',
  `ENABLED` char(1) NOT NULL DEFAULT 'Y',
  `IS_GLOBAL` varchar(1) NOT NULL DEFAULT 'N',
  `LOCK_TIME` varchar(3) DEFAULT NULL,
  `IS_LOCKABLE` varchar(1) NOT NULL DEFAULT 'N',
  `GDD_BASKET` varchar(1) NOT NULL DEFAULT 'N',
  `OTHER_LINK` varchar(1) NOT NULL DEFAULT 'N',
  PRIMARY KEY (`RES_TABLE`,`BASKET_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la table `borough`
--

CREATE TABLE IF NOT EXISTS `borough` (
  `BOROUGH_ID` int(11) NOT NULL,
  `BOROUGH_LABEL` varchar(250) NOT NULL,
  PRIMARY KEY (`BOROUGH_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la table `cantons`
--

CREATE TABLE IF NOT EXISTS `cantons` (
  `CANTON_ID` int(11) NOT NULL,
  `SEQUENCE` int(11) NOT NULL,
  `CANTON_LABEL` varchar(250) NOT NULL,
  `BOROUGH_ID` int(11) NOT NULL,
  PRIMARY KEY (`CANTON_ID`,`SEQUENCE`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la table `coll_serv`
--

CREATE TABLE IF NOT EXISTS `coll_serv` (
  `ID_COLL` varchar(50) CHARACTER SET utf8 NOT NULL,
  `ID_SERV` varchar(50) CHARACTER SET utf8 NOT NULL,
  PRIMARY KEY (`ID_COLL`,`ID_SERV`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Structure de la table `communes`
--

CREATE TABLE IF NOT EXISTS `communes` (
  `COMMUNE_ID` int(11) NOT NULL,
  `COMMUNE_LABEL` varchar(250) NOT NULL,
  `POSTAL_CODE` int(11) NOT NULL,
  `CANTON_ID` int(11) NOT NULL,
  `EPCI_ID` int(11) NOT NULL,
  `BOROUGH_ID` int(11) NOT NULL,
  PRIMARY KEY (`COMMUNE_ID`),
  KEY `POSTAL_CODE` (`POSTAL_CODE`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la table `docservers`
--

CREATE TABLE IF NOT EXISTS `docservers` (
  `DOCSERVER_ID` varchar(32) NOT NULL DEFAULT '1',
  `DEVICE_TYPE` varchar(32) DEFAULT NULL,
  `DEVICE_LABEL` varchar(255) DEFAULT NULL,
  `IS_READONLY` char(1) DEFAULT 'N',
  `ENABLED` char(1) NOT NULL DEFAULT 'Y',
  `SIZE_LIMIT` bigint(8) NOT NULL DEFAULT '0',
  `ACTUAL_SIZE` bigint(8) NOT NULL DEFAULT '0',
  `PATH_TEMPLATE` varchar(255) NOT NULL DEFAULT '',
  `EXT_DOCSERVER_INFO` varchar(255) DEFAULT NULL,
  `CHAIN_BEFORE` varchar(32) DEFAULT NULL,
  `CHAIN_AFTER` varchar(32) DEFAULT NULL,
  `CREATION_DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `CLOSING_DATE` datetime DEFAULT '0000-00-00 00:00:00',
  `LOCKED` int(1) DEFAULT '0',
  PRIMARY KEY (`DOCSERVER_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Description of the electronic media';

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

--
-- Structure de la table `doctypes`
--

CREATE TABLE IF NOT EXISTS `doctypes` (
  `RES_TABLE` varchar(32) NOT NULL DEFAULT '',
  `TYPE_ID` varchar(50) NOT NULL DEFAULT '',
  `DESCRIPTION` varchar(255) NOT NULL DEFAULT '',
  `DELAI_TRAITEMENT` int(2) NOT NULL DEFAULT '21',
  `DELAI_RELANCE1` int(2) NOT NULL DEFAULT '14',
  `DELAI_RELANCE2` int(2) NOT NULL DEFAULT '1',
  `CUSTOM_T1` varchar(255) DEFAULT NULL,
  `CUSTOM_T2` varchar(255) DEFAULT NULL,
  `CUSTOM_T3` varchar(255) DEFAULT NULL,
  `ENABLED` char(1) NOT NULL DEFAULT 'Y',
  `GENERATE` char(1) NOT NULL DEFAULT 'N',
  `MODEL` varchar(255) DEFAULT NULL,
  `ACTION_BITMASK` smallint(6) NOT NULL DEFAULT '3',
  PRIMARY KEY (`TYPE_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Resource types';

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

--
-- Structure de la table `domains`
--

CREATE TABLE IF NOT EXISTS `domains` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `LABEL` varchar(255) COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=3 ;

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

--
-- Structure de la table `domain_service`
--

CREATE TABLE IF NOT EXISTS `domain_service` (
  `ID_DOMAIN` bigint(20) NOT NULL,
  `ID_SERVICE` varchar(30) CHARACTER SET utf8 NOT NULL,
  PRIMARY KEY (`ID_DOMAIN`,`ID_SERVICE`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Structure de la table `epci`
--

CREATE TABLE IF NOT EXISTS `epci` (
  `EPCI_ID` int(11) NOT NULL,
  `EPCI_LABEL` varchar(250) NOT NULL,
  `TYPE` varchar(5) NOT NULL,
  `BOROUGH_ID` int(11) NOT NULL,
  PRIMARY KEY (`EPCI_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la table `ext_applications`
--

CREATE TABLE IF NOT EXISTS `ext_applications` (
  `USER_ID` varchar(32) NOT NULL,
  `FORMAT` varchar(50) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `PATH` varchar(1000) NOT NULL,
  PRIMARY KEY (`USER_ID`,`FORMAT`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la table `ext_docserver`
--

CREATE TABLE IF NOT EXISTS `ext_docserver` (
  `DOC_ID` varchar(255) NOT NULL DEFAULT '',
  `PATH` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`DOC_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Sample for external document server (Ascent Capture)';

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

--
-- Structure de la table `fileplans`
--

CREATE TABLE IF NOT EXISTS `fileplans` (
  `FILEPLAN_ID` int(11) NOT NULL AUTO_INCREMENT,
  `FILEPLAN_DESCRIPTION` varchar(255) COLLATE utf8_general_ci NOT NULL,
  `FILEPLAN_OWNER` varchar(32) COLLATE utf8_general_ci NOT NULL,
  `CREATION_DATE` datetime NOT NULL,
  `SHARED_FILEPLAN` varchar(1) COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
  PRIMARY KEY (`FILEPLAN_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `folderres`
--

CREATE TABLE IF NOT EXISTS `folderres` (
  `RES_ID` bigint(8) NOT NULL,
  `FOLDER_ID` bigint(8) NOT NULL,
  PRIMARY KEY (`RES_ID`,`FOLDER_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la table `folders`
--

CREATE TABLE IF NOT EXISTS `folders` (
  `FOLDER_ID` bigint(8) NOT NULL AUTO_INCREMENT,
  `DESCRIPTION` varchar(50) COLLATE utf8_general_ci NOT NULL,
  `FILEPLAN_ID` int(11) NOT NULL,
  `USER_ID` varchar(32) COLLATE utf8_general_ci NOT NULL,
  `PARENT_ID` bigint(8) DEFAULT '-1',
  `SHARED_FOLDER` varchar(1) COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
  PRIMARY KEY (`FOLDER_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `folderscope`
--

CREATE TABLE IF NOT EXISTS `folderscope` (
  `FOLDER_ID` bigint(8) NOT NULL,
  `SCOPE` varchar(16) NOT NULL,
  `VALUE` varchar(32) NOT NULL,
  `WRITE_RIGHT` varchar(1) NOT NULL DEFAULT 'N',
  PRIMARY KEY (`FOLDER_ID`,`SCOPE`,`VALUE`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la table `groupbasket`
--

CREATE TABLE IF NOT EXISTS `groupbasket` (
  `GROUP_ID` varchar(32) NOT NULL DEFAULT '',
  `BASKET_ID` varchar(32) NOT NULL DEFAULT '',
  `SEQUENCE` int(11) NOT NULL DEFAULT '0',
  `REDIRECT_BASKETLIST` text,
  `REDIRECT_GROUPLIST` text,
  `CAN_REDIRECT` char(1) NOT NULL DEFAULT 'Y',
  `CAN_DELETE` char(1) NOT NULL DEFAULT 'N',
  `CAN_INSERT` char(1) NOT NULL DEFAULT 'N',
  `RESULT_PAGE` varchar(255) DEFAULT NULL,
  `FKID_DYNAMIC_ARRAY` int(11) NOT NULL,
  PRIMARY KEY (`GROUP_ID`,`BASKET_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Group to basket relation (for primary group only)';

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

--
-- Structure de la table `groupsecurity`
--

CREATE TABLE IF NOT EXISTS `groupsecurity` (
  `GROUP_ID` varchar(32) NOT NULL DEFAULT '',
  `RESGROUP_ID` varchar(32) NOT NULL DEFAULT '',
  `CAN_VIEW` char(1) NOT NULL DEFAULT '',
  `CAN_ADD` char(1) NOT NULL DEFAULT '',
  `CAN_DELETE` char(1) NOT NULL DEFAULT '',
  PRIMARY KEY (`GROUP_ID`,`RESGROUP_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Special security policy on resource groups';

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

--
-- Structure de la table `gtb_tableau`
--

CREATE TABLE IF NOT EXISTS `gtb_tableau` (
  `gtb_id` int(11) NOT NULL AUTO_INCREMENT,
  `gtb_fkid_basket` varchar(32) NOT NULL,
  `gtb_nom` varchar(255) NOT NULL,
  `gtb_description` text NOT NULL,
  `gtb_css_table` varchar(45) DEFAULT NULL,
  `gtb_css_entete` varchar(45) DEFAULT NULL,
  `gtb_css_ligne1` varchar(45) DEFAULT NULL,
  `gtb_css_ligne2` varchar(45) DEFAULT NULL,
  `gtb_imprimer_liste` varchar(1) NOT NULL DEFAULT 'N',
  `gtb_multi_action` varchar(1) NOT NULL DEFAULT 'N',
  `gtb_url_global` varchar(255) NOT NULL,
  `gtb_liste_bouton` text NOT NULL,
  `gtb_nbre_resultat_page` int(11) NOT NULL DEFAULT '10',
  `gtb_multi_action_champs` int(11) NOT NULL DEFAULT '1',
  `gtb_desc_asc` varchar(1) NOT NULL DEFAULT 'N',
  `gtb_table_base` varchar(1) NOT NULL DEFAULT 'N',
  `gtb_info_url_global` varchar(255) DEFAULT NULL,
  `gtb_multi_action_option` varchar(45) NOT NULL,
  PRIMARY KEY (`gtb_id`),
  KEY `gtb_id` (`gtb_id`,`gtb_fkid_basket`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=18 ;

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

--
-- Structure de la table `gtb_tableau_champs`
--

CREATE TABLE IF NOT EXISTS `gtb_tableau_champs` (
  `gtc_id` int(11) NOT NULL AUTO_INCREMENT,
  `gtc_fkid_gtb_tableau` int(11) NOT NULL,
  `gtc_nom_champs_requete` varchar(45) NOT NULL,
  `gtc_format` varchar(45) NOT NULL,
  `gtc_alignement` varchar(6) NOT NULL,
  `gtc_nom_entete` varchar(45) NOT NULL,
  `gtc_position` int(11) NOT NULL,
  `gtc_taille_px` int(11) NOT NULL DEFAULT '100',
  `gtc_tri_dessus` varchar(45) NOT NULL,
  `gtc_hidden` varchar(1) NOT NULL DEFAULT 'N',
  `gtc_limit_impression` varchar(3) NOT NULL,
  `gtc_hidden_print` varchar(1) NOT NULL DEFAULT 'N',
  `gtc_taille_mm` int(11) NOT NULL DEFAULT '20',
  PRIMARY KEY (`gtc_id`),
  KEY `gtc_id` (`gtc_id`,`gtc_fkid_gtb_tableau`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=170 ;

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

--
-- Structure de la table `history`
--

CREATE TABLE IF NOT EXISTS `history` (
  `ID` bigint(8) NOT NULL AUTO_INCREMENT,
  `TABLE_NAME` varchar(32) DEFAULT NULL,
  `RECORD_ID` varchar(255) DEFAULT NULL,
  `EVENT_TYPE` varchar(32) NOT NULL DEFAULT '',
  `USER_ID` varchar(50) NOT NULL DEFAULT '',
  `EVENT_DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `INFO` text,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Event history' AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `history_batch`
--

CREATE TABLE IF NOT EXISTS `history_batch` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `module_name` varchar(32) COLLATE utf8_general_ci DEFAULT NULL,
  `batch_id` int(8) DEFAULT NULL,
  `event_date` datetime NOT NULL,
  `total_processed` int(8) DEFAULT NULL,
  `total_errors` int(8) DEFAULT NULL,
  `info` text COLLATE utf8_general_ci,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `listinstance`
--

CREATE TABLE IF NOT EXISTS `listinstance` (
  `RES_TABLE` varchar(32) NOT NULL,
  `RES_ID` bigint(20) NOT NULL,
  `SEQUENCE` bigint(8) NOT NULL DEFAULT '0',
  `USER_ID` varchar(50) NOT NULL DEFAULT '',
  `SERVICE_ID` varchar(32) DEFAULT NULL,
  `VIEWED` int(8) DEFAULT '0',
  `SEEN` int(1) NOT NULL DEFAULT '0',
  `BY_USER_ID` varchar(32) NOT NULL DEFAULT '',
  `MAIL_ACTION` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`RES_TABLE`,`RES_ID`,`SEQUENCE`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la table `listmodel`
--

CREATE TABLE IF NOT EXISTS `listmodel` (
  `ID` bigint(8) NOT NULL,
  `RES_TABLE` varchar(32) NOT NULL DEFAULT 'res_x',
  `SEQUENCE` bigint(8) NOT NULL DEFAULT '0',
  `USER_ID` varchar(50) DEFAULT NULL,
  `SERVICE_ID` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`ID`,`RES_TABLE`,`SEQUENCE`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la table `listmodel_assoc`
--

CREATE TABLE IF NOT EXISTS `listmodel_assoc` (
  `ID` bigint(8) NOT NULL AUTO_INCREMENT,
  `NAME` varchar(255) COLLATE utf8_general_ci NOT NULL,
  `ASSOC_SERVICE` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=14 ;

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

--
-- Structure de la table `models`
--

CREATE TABLE IF NOT EXISTS `models` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `LABEL` varchar(50) CHARACTER SET utf8 NOT NULL,
  `CREATION_DATE` datetime NOT NULL,
  `COMMENT` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
  `CONTENT` longtext CHARACTER SET utf8 NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=6 ;

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

--
-- Structure de la table `model_service`
--

CREATE TABLE IF NOT EXISTS `model_service` (
  `ID_SERVICE` varchar(30) CHARACTER SET utf8 NOT NULL,
  `ID_MODEL` bigint(20) NOT NULL,
  PRIMARY KEY (`ID_SERVICE`,`ID_MODEL`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

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

--
-- Structure de la table `notes`
--

CREATE TABLE IF NOT EXISTS `notes` (
  `ID` bigint(8) NOT NULL AUTO_INCREMENT,
  `RECORD_ID` varchar(255) DEFAULT NULL,
  `USER_ID` varchar(50) NOT NULL DEFAULT '',
  `DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `INFO` text,
  `ACCESS_SERVICES` varchar(255) DEFAULT NULL,
  `ACCESS_USERS` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Event history' AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `parameters`
--

CREATE TABLE IF NOT EXISTS `parameters` (
  `KEY1` varchar(32) DEFAULT NULL,
  `KEY2` varchar(32) DEFAULT NULL,
  `KEY3` varchar(32) DEFAULT NULL,
  `VALUE` varchar(32) NOT NULL DEFAULT '0',
  `LIB_PARAM` varchar(128) NOT NULL DEFAULT '',
  `id` varchar(50) DEFAULT NULL,
  `param_value_char` varchar(50) DEFAULT NULL,
  `param_value_int` int(8) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la table `quarter`
--

CREATE TABLE IF NOT EXISTS `quarter` (
  `QUARTER_ID` int(8) NOT NULL AUTO_INCREMENT,
  `QUARTER_LABEL` varchar(1000) COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`QUARTER_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `resgroups`
--

CREATE TABLE IF NOT EXISTS `resgroups` (
  `RESGROUP_ID` varchar(32) NOT NULL DEFAULT '',
  `RESGROUP_DESC` varchar(255) NOT NULL DEFAULT '',
  `CREATED_BY` varchar(255) NOT NULL DEFAULT '',
  `CREATION_DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`RESGROUP_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Resource groups';

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

--
-- Structure de la table `resgroup_content`
--

CREATE TABLE IF NOT EXISTS `resgroup_content` (
  `RES_TABLE` varchar(8) NOT NULL DEFAULT '',
  `RES_ID` bigint(8) NOT NULL DEFAULT '0',
  `RESGROUP_ID` varchar(32) NOT NULL DEFAULT '',
  `SEQUENCE` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`RES_TABLE`,`RES_ID`,`RESGROUP_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Resource group content (multi table)';

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

--
-- Structure de la table `res_x`
--

CREATE TABLE IF NOT EXISTS `res_x` (
  `RES_ID` bigint(8) NOT NULL AUTO_INCREMENT,
  `TITLE` varchar(255) DEFAULT NULL,
  `SUBJECT` text,
  `DESCRIPTION` text,
  `PUBLISHER` varchar(255) DEFAULT NULL,
  `CONTRIBUTOR` varchar(255) DEFAULT NULL,
  `TYPE_ID` varchar(50) NOT NULL DEFAULT '',
  `FORMAT` varchar(50) NOT NULL DEFAULT '',
  `TYPIST` varchar(50) NOT NULL DEFAULT '',
  `CREATION_DATE` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AUTHOR` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `AUTHOR_NAME` text,
  `IDENTIFIER` varchar(255) DEFAULT NULL,
  `SOURCE` varchar(255) DEFAULT NULL,
  `DOC_LANGUAGE` varchar(50) DEFAULT NULL,
  `RELATION` varchar(255) DEFAULT NULL,
  `COVERAGE` varchar(255) DEFAULT NULL,
  `DOC_DATE` datetime DEFAULT NULL,
  `RIGHTS` varchar(20) NOT NULL DEFAULT '0',
  `DOCSERVER_ID` varchar(32) NOT NULL DEFAULT '',
  `ARBOX_ID` varchar(32) DEFAULT NULL,
  `FULLTEXT_RESULT` varchar(10) DEFAULT NULL,
  `PATH` varchar(255) DEFAULT NULL,
  `FILENAME` varchar(255) DEFAULT NULL,
  `OFFSET` varchar(255) DEFAULT NULL,
  `OFFSET_DOC` varchar(255) DEFAULT NULL,
  `LOGICAL_ADR` varchar(255) DEFAULT NULL,
  `FINGERPRINT` varchar(255) DEFAULT NULL,
  `FILESIZE` bigint(20) DEFAULT NULL,
  `IS_PAPER` char(1) DEFAULT NULL,
  `PAGE_COUNT` int(11) DEFAULT NULL,
  `SCAN_DATE` datetime DEFAULT NULL,
  `SCAN_USER` varchar(50) DEFAULT NULL,
  `SCAN_LOCATION` varchar(255) DEFAULT NULL,
  `SCAN_WKSTATION` varchar(255) DEFAULT NULL,
  `SCAN_BATCH` varchar(50) DEFAULT NULL,
  `BURN_BATCH` varchar(50) DEFAULT NULL,
  `SCAN_POSTMARK` varchar(50) DEFAULT NULL,
  `ENVELOP_ID` bigint(20) DEFAULT NULL,
  `STATUS` varchar(7) DEFAULT 'NEW',
  `DESTINATION` varchar(50) DEFAULT NULL,
  `DEST_USER` varchar(50) DEFAULT NULL,
  `APPROVER` varchar(50) DEFAULT NULL,
  `VALIDATION_DATE` datetime DEFAULT NULL,
  `WORK_BATCH` bigint(8) DEFAULT NULL,
  `ORIGIN` varchar(50) DEFAULT NULL,
  `IS_INGOING` char(1) DEFAULT NULL,
  `PRIORITY` smallint(6) DEFAULT NULL,
  `SENDER_ID` int(8) DEFAULT NULL,
  `CUSTOM_T1` text,
  `CUSTOM_N1` bigint(20) DEFAULT NULL,
  `CUSTOM_F1` float DEFAULT NULL,
  `CUSTOM_D1` datetime DEFAULT NULL,
  `CUSTOM_T2` varchar(255) DEFAULT NULL,
  `CUSTOM_N2` bigint(20) DEFAULT NULL,
  `CUSTOM_F2` float DEFAULT NULL,
  `CUSTOM_D2` datetime DEFAULT NULL,
  `CUSTOM_T3` varchar(255) DEFAULT NULL,
  `CUSTOM_N3` bigint(20) DEFAULT NULL,
  `CUSTOM_F3` float DEFAULT NULL,
  `CUSTOM_D3` datetime DEFAULT NULL,
  `CUSTOM_T4` varchar(255) DEFAULT NULL,
  `CUSTOM_N4` bigint(20) DEFAULT NULL,
  `CUSTOM_F4` float DEFAULT NULL,
  `CUSTOM_D4` datetime DEFAULT NULL,
  `CUSTOM_T5` varchar(255) NOT NULL DEFAULT 'false',
  `CUSTOM_N5` bigint(20) DEFAULT NULL,
  `CUSTOM_F5` float DEFAULT NULL,
  `CUSTOM_D5` datetime DEFAULT NULL,
  `CUSTOM_T6` varchar(255) NOT NULL DEFAULT 'false',
  `CUSTOM_T7` varchar(255) NOT NULL DEFAULT 'false',
  `CUSTOM_T8` varchar(255) NOT NULL DEFAULT 'false',
  `CUSTOM_T9` varchar(255) DEFAULT NULL,
  `CUSTOM_T10` varchar(255) DEFAULT NULL,
  `CUSTOM_T11` varchar(255) DEFAULT NULL,
  `CUSTOM_T12` varchar(255) DEFAULT NULL,
  `CUSTOM_T13` varchar(255) DEFAULT NULL,
  `CUSTOM_T14` varchar(255) DEFAULT NULL,
  `CUSTOM_T15` varchar(255) NOT NULL DEFAULT 'false',
  `CUSTOM_T16` varchar(255) NOT NULL DEFAULT 'false',
  `CUSTOM_T17` varchar(255) NOT NULL DEFAULT 'false',
  `IS_FOLDER` char(1) NOT NULL DEFAULT 'N',
  `FOLDER_ID` varchar(50) DEFAULT NULL,
  `SOCIETE` varchar(255) DEFAULT NULL,
  `FLAG_NOTIF` char(1) NOT NULL DEFAULT 'N',
  `FLAG_RELANCE1` char(1) NOT NULL DEFAULT 'N',
  `FLAG_RELANCE2` char(1) NOT NULL DEFAULT 'N',
  `GID_ID` varchar(255) DEFAULT NULL,
  `COLL_ID` varchar(50) DEFAULT NULL,
  `CUSTOM_D6` datetime DEFAULT NULL,
  `CUSTOM_D7` datetime DEFAULT NULL,
  `CUSTOM_D8` datetime DEFAULT NULL,
  `CUSTOM_D9` datetime DEFAULT NULL,
  `CUSTOM_D10` datetime DEFAULT NULL,
  `CUSTOM_D11` datetime DEFAULT NULL,
  `CUSTOM_D12` datetime DEFAULT NULL,
  `WAIT_ACTION` varchar(1) DEFAULT 'N',
  `RESERVED` varchar(1) NOT NULL DEFAULT 'N',
  `CUSTOM_T18` varchar(255) DEFAULT NULL,
  `CUSTOM_T19` varchar(255) DEFAULT NULL,
  `CUSTOM_T20` varchar(255) DEFAULT NULL,
  `CUSTOM_T21` varchar(255) DEFAULT NULL,
  `MAIL_ACTION` varchar(32) DEFAULT NULL,
  `SIGNING` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`RES_ID`),
  FULLTEXT KEY `search` (`TITLE`,`DESCRIPTION`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Contains all resource descriptors (can be fragmented)' AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `saved_queries`
--

CREATE TABLE IF NOT EXISTS `saved_queries` (
  `query_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` varchar(32) COLLATE utf8_general_ci DEFAULT NULL,
  `query_name` varchar(255) COLLATE utf8_general_ci NOT NULL,
  `creation_date` datetime NOT NULL,
  `created_by` varchar(32) COLLATE utf8_general_ci NOT NULL,
  `query_type` varchar(50) COLLATE utf8_general_ci NOT NULL,
  `query_txt` text COLLATE utf8_general_ci NOT NULL,
  `last_modification_date` datetime DEFAULT NULL,
  PRIMARY KEY (`query_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `security`
--

CREATE TABLE IF NOT EXISTS `security` (
  `GROUP_ID` varchar(32) NOT NULL DEFAULT '',
  `RES_TABLE` varchar(32) NOT NULL DEFAULT '',
  `WHERE_CLAUSE` text NOT NULL,
  `COMMENT` text,
  `CAN_INSERT` char(1) NOT NULL DEFAULT 'N',
  `CAN_UPDATE` char(1) NOT NULL DEFAULT 'N',
  PRIMARY KEY (`GROUP_ID`,`RES_TABLE`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Rights for a group to a table (SQL where clause restriction)';

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

--
-- Structure de la table `sender`
--

CREATE TABLE IF NOT EXISTS `sender` (
  `ID` int(8) NOT NULL AUTO_INCREMENT,
  `CIVILITY` varchar(255) COLLATE utf8_general_ci DEFAULT NULL,
  `LASTNAME` varchar(255) COLLATE utf8_general_ci NOT NULL,
  `FIRSTNAME` varchar(255) COLLATE utf8_general_ci DEFAULT NULL,
  `SOCIETY` varchar(255) COLLATE utf8_general_ci DEFAULT NULL,
  `FUNCTION` varchar(255) COLLATE utf8_general_ci DEFAULT NULL,
  `STREET_NUM` varchar(20) COLLATE utf8_general_ci DEFAULT NULL,
  `STREET` varchar(255) COLLATE utf8_general_ci DEFAULT NULL,
  `TOWN` varchar(255) COLLATE utf8_general_ci DEFAULT NULL,
  `CP` varchar(20) COLLATE utf8_general_ci DEFAULT NULL,
  `PHONE` varchar(20) COLLATE utf8_general_ci DEFAULT NULL,
  `PHONE2` varchar(20) COLLATE utf8_general_ci DEFAULT NULL,
  `MOBILE` varchar(20) COLLATE utf8_general_ci DEFAULT NULL,
  `FAX` varchar(20) COLLATE utf8_general_ci DEFAULT NULL,
  `MAIL` varchar(255) COLLATE utf8_general_ci DEFAULT NULL,
  `TOCONTACT` varchar(255) COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=11 ;

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

--
-- Structure de la table `services`
--

CREATE TABLE IF NOT EXISTS `services` (
  `ID` varchar(30) NOT NULL DEFAULT '',
  `SERVICE` varchar(50) NOT NULL DEFAULT '',
  `ENABLED` char(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

--
-- Structure de la table `street`
--

CREATE TABLE IF NOT EXISTS `street` (
  `STREET_ID` int(8) NOT NULL AUTO_INCREMENT,
  `STREET_LABEL` varchar(1000) COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`STREET_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `tickets`
--

CREATE TABLE IF NOT EXISTS `tickets` (
  `TICKET_ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `RES_ID` bigint(20) NOT NULL,
  `CREATION_DATE` datetime NOT NULL,
  `MARKET_NUM` int(11) NOT NULL,
  `IS_ADAPTED` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
  `IS_FORMALIZED` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
  `CREDIT_ACCOUNT` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `INVENTORY_IDENT` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `IMPUTATION` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `MARKET_SUBJECT` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `HOLDER` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `AMOUNT_TO_MANDATE` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `ENGAGEMENT` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `TOTAL_MARKET` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `PIECE` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `EXERCICE` year(4) NOT NULL,
  PRIMARY KEY (`TICKET_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `tickets_amounts`
--

CREATE TABLE IF NOT EXISTS `tickets_amounts` (
  `TICKET_AMOUNT_ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `TICKET_ID` bigint(20) NOT NULL,
  `NUM_MANDATE` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `DATE_MANDATE` date DEFAULT NULL,
  `AMOUNT` float DEFAULT NULL,
  PRIMARY KEY (`TICKET_AMOUNT_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `usergroups`
--

CREATE TABLE IF NOT EXISTS `usergroups` (
  `GROUP_ID` varchar(32) NOT NULL DEFAULT '',
  `GROUP_DESC` varchar(255) DEFAULT NULL,
  `ADMINISTRATOR` char(1) NOT NULL DEFAULT 'N',
  `CONSULT_GROUP` char(1) NOT NULL DEFAULT 'Y',
  `VIEW_RELANCE` char(1) NOT NULL DEFAULT 'N',
  `VIEW_STATS` char(1) NOT NULL DEFAULT 'N',
  `MODIF_RIGHTS` char(1) NOT NULL DEFAULT 'N',
  `EXPORT` char(1) NOT NULL DEFAULT 'N',
  `ENABLED` char(1) NOT NULL DEFAULT 'Y',
  `DELETE_RIGHTS` char(1) DEFAULT 'N',
  `DELETE_COPY_RIGHTS` char(1) DEFAULT 'Y',
  `PRINT_RIGHTS` char(1) DEFAULT 'N',
  `PARAM` char(1) NOT NULL DEFAULT 'N',
  `PRINT_SEP_RIGHTS` varchar(1) DEFAULT 'N',
  `ATTACHMENT_RIGHTS` varchar(1) DEFAULT 'N',
  `CLOSE_RIGHTS` varchar(1) DEFAULT 'N',
  `MAIL_RIGHTS` varchar(1) NOT NULL DEFAULT 'N',
  `REJECT_RIGHTS` varchar(1) NOT NULL DEFAULT 'N',
  `DEF_REJECT_RIGHTS` varchar(1) NOT NULL DEFAULT 'N',
  `VALIDATE_RIGHTS` varchar(1) NOT NULL DEFAULT 'N',
  `DELETE_MAIL_ACTIONS_RIGHTS` varchar(1) NOT NULL DEFAULT 'N',
  `FOLDER_RIGHTS` varchar(1) NOT NULL DEFAULT 'N',
  `GDD` varchar(1) NOT NULL DEFAULT 'N',
  PRIMARY KEY (`GROUP_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='User groups';

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

--
-- Structure de la table `usergroup_content`
--

CREATE TABLE IF NOT EXISTS `usergroup_content` (
  `USER_ID` varchar(32) NOT NULL DEFAULT '',
  `GROUP_ID` varchar(32) NOT NULL DEFAULT '',
  `PRIMARY_GROUP` char(1) NOT NULL DEFAULT '',
  `ROLE` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`USER_ID`,`GROUP_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='User to group relation';

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

--
-- Structure de la table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `USER_ID` varchar(32) NOT NULL DEFAULT '',
  `PASSWORD` varchar(255) DEFAULT NULL,
  `FIRSTNAME` varchar(255) DEFAULT NULL,
  `LASTNAME` varchar(255) DEFAULT NULL,
  `PHONE` varchar(15) DEFAULT NULL,
  `MAIL` varchar(255) DEFAULT NULL,
  `DEPARTMENT` varchar(50) DEFAULT NULL,
  `FONCTION` varchar(255) DEFAULT NULL,
  `COOKIE_KEY` varchar(255) DEFAULT NULL,
  `COOKIE_DATE` datetime DEFAULT '0000-00-00 00:00:00',
  `ELU` char(1) NOT NULL DEFAULT 'N',
  `ENABLED` char(1) NOT NULL DEFAULT 'Y',
  `STATUS` varchar(12) NOT NULL DEFAULT 'OK',
  `CHANGE_PASSWORD` char(1) NOT NULL DEFAULT 'Y',
  `DELAY` datetime DEFAULT NULL,
  `NOTIFICATION` int(11) DEFAULT '127',
  PRIMARY KEY (`USER_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Users';

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

--
-- Structure de la table `user_abs`
--

CREATE TABLE IF NOT EXISTS `user_abs` (
  `USER_ABS` varchar(30) NOT NULL DEFAULT '',
  `NEW_USER` varchar(30) NOT NULL DEFAULT '',
  `BASKET_ID` varchar(255) NOT NULL,
  `IS_VIRTUAL` char(1) NOT NULL DEFAULT 'N',
  `BASKET_OWNER` varchar(255) DEFAULT NULL,
  `SYSTEM_ID` bigint(8) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`SYSTEM_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

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

--
-- Structure de la table `welcome_txt`
--

CREATE TABLE IF NOT EXISTS `welcome_txt` (
  `ID` varchar(30) COLLATE utf8_general_ci NOT NULL,
  `VALUE` longtext COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Structure de la table `gdd_annotation`
--

CREATE TABLE `gdd_annotation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fkid_demande` int(11) NOT NULL,
  `fkid_createur` varchar(32) NOT NULL,
  `date_creation` datetime NOT NULL,
  `annotation` text NOT NULL,
  `tous` varchar(1) NOT NULL DEFAULT 'N',
  `liste_groupe` text NOT NULL,
  `liste_user` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ;

--
-- Structure de la table `gdd_annotation_user`
--

CREATE TABLE `gdd_annotation_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fkid_destinataire` varchar(32) NOT NULL,
  `lu` varchar(1) NOT NULL DEFAULT 'N',
  `date_lecture` datetime NOT NULL,
  `fkid_annotation` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Structure de la table `gdd_autorise_user`
--

CREATE TABLE `gdd_autorise_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fkid_user_proprietaire` varchar(32) NOT NULL,
  `fkid_user_autorise` varchar(32) NOT NULL,
  `date_creation` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Structure de la table `gdd_demande`
--

CREATE TABLE `gdd_demande` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `fkid_type_demande` int(11) NOT NULL,
  `annee` int(11) NOT NULL,
  `numero` int(11) NOT NULL,
  `fkid_courrier` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `titre_demande` varchar(255) NOT NULL,
  `fkid_quartier` int(11) NOT NULL,
  `fkid_elu_quartier` int(11) NOT NULL,
  `fkid_domaine` int(11) NOT NULL,
  `fkid_elu_domaine` int(11) NOT NULL,
  `numero_lieu_demande` varchar(10) NOT NULL,
  `rue` varchar(150) NOT NULL,
  `ville` varchar(250) NOT NULL,
  `code_postal` int(11) NOT NULL,
  `complement_adresse` varchar(255) NOT NULL,
  `description_demande` text NOT NULL,
  `fkid_user_createur` varchar(32) NOT NULL,
  `demande_cloturer` varchar(1) NOT NULL DEFAULT 'N',
  `date_cloture` datetime NOT NULL,
  `fkid_user_cloture` varchar(32) NOT NULL,
  `date_limite` date NOT NULL,
  `info_compl_demandeur` text NOT NULL,
  `fkid_etat` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Structure de la table `gdd_domaine`
--

CREATE TABLE `gdd_domaine` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(45) NOT NULL,
  `actif` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Structure de la table `gdd_domaine_elu`
--

CREATE TABLE `gdd_domaine_elu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fkid_domaine` int(11) NOT NULL,
  `fkid_elu` int(11) NOT NULL,
  `elu_principale` varchar(1) NOT NULL DEFAULT 'N',
  `actif` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Structure de la table `gdd_domaine_groupe`
--

CREATE TABLE `gdd_domaine_groupe` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fkid_domaine` int(11) NOT NULL,
  `fkid_groupe` varchar(32) NOT NULL,
  `actif` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Structure de la table `gdd_elu`
--

CREATE TABLE `gdd_elu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(45) NOT NULL,
  `prenom` varchar(45) NOT NULL,
  `statut` varchar(100) NOT NULL,
  `actif` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Structure de la table `gdd_etat`
--

CREATE TABLE `gdd_etat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(45) NOT NULL,
  `actif` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Structure de la table `gdd_intervention`
--

CREATE TABLE `gdd_intervention` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fkid_demande` int(11) NOT NULL,
  `fkid_groupe_emetteur` varchar(32) NOT NULL,
  `fkid_user_emetteur` varchar(32) NOT NULL,
  `fkid_groupe_destinataire` varchar(32) NOT NULL,
  `fkid_user_destinataire` varchar(32) NOT NULL,
  `fkid_user_cloture` varchar(32) NOT NULL,
  `description` text NOT NULL,
  `realisation` text NOT NULL,
  `reponse` text NOT NULL,
  `date_creation` datetime NOT NULL,
  `date_delai` date NOT NULL,
  `date_realisation` date NOT NULL,
  `date_cloture` datetime NOT NULL,
  `intervention_cloturer` varchar(1) NOT NULL DEFAULT 'N',
  `erreur_destination` varchar(1) NOT NULL DEFAULT 'N',
  `erreur_vue` varchar(1) NOT NULL DEFAULT 'N',
  `info_erreur_destination` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Structure de la table `gdd_inter_piece_jointe`
--

CREATE TABLE `gdd_inter_piece_jointe` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fkid_intervention` int(11) NOT NULL,
  `type_fichier` varchar(5) NOT NULL,
  `nom_fichier` varchar(45) NOT NULL,
  `titre_fichier` varchar(255) NOT NULL,
  `fkid_user_createur` varchar(32) NOT NULL,
  `date_creation` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Structure de la table `gdd_quartier`
--

CREATE TABLE `gdd_quartier` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(45) NOT NULL,
  `actif` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Structure de la table `gdd_quartier_elu`
--

CREATE TABLE `gdd_quartier_elu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fkid_quartier` int(11) NOT NULL,
  `fkid_elu` int(11) NOT NULL,
  `elu_principale` varchar(1) NOT NULL DEFAULT 'N',
  `actif` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Structure de la table `gdd_rue`
--

CREATE TABLE `gdd_rue` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom_complet` varchar(150) NOT NULL,
  `objet` varchar(20) NOT NULL,
  `liaison` varchar(10) NOT NULL,
  `prenom` varchar(50) NOT NULL,
  `nom` varchar(50) NOT NULL,
  `fkid_ville` int(11) NOT NULL,
  `fkid_code_rue` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Structure de la table `gdd_type_demande`
--

CREATE TABLE `gdd_type_demande` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `abreviation` varchar(5) NOT NULL,
  `nom` varchar(45) NOT NULL,
  `delai_reponse` int(11) NOT NULL DEFAULT '21',
  `actif` varchar(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;



/*!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 */;
