--
--


-- Started on 2025-03-24 13:45:18

SELECT pg_catalog.set_config('search_path', '', false);

DROP DATABASE dbremabox;
--
-- TOC entry 3391 (class 1262 OID 53863)
-- Name: dbremabox; Type: DATABASE; Schema: -; Owner: postgres
--

CREATE DATABASE dbremabox WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'English_United States.1252' LC_CTYPE = 'English_United States.1252';


ALTER DATABASE dbremabox OWNER TO postgres;


SELECT pg_catalog.set_config('search_path', '', false);

--
-- TOC entry 10 (class 2615 OID 53864)
-- Name: ardoc; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA ardoc;


ALTER SCHEMA ardoc OWNER TO postgres;

--
-- TOC entry 3392 (class 0 OID 0)
-- Dependencies: 10
-- Name: SCHEMA ardoc; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA ardoc IS 'Base de données de la gestion des archives physiques';


--
-- TOC entry 5 (class 2615 OID 53865)
-- Name: starged; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA starged;


ALTER SCHEMA starged OWNER TO postgres;

--
-- TOC entry 3395 (class 0 OID 0)
-- Dependencies: 5
-- Name: SCHEMA starged; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA starged IS 'Schéma des tables liées au modules archives';


--
-- TOC entry 1 (class 3079 OID 12387)
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;


--
-- TOC entry 3396 (class 0 OID 0)
-- Dependencies: 1
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
--

COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';


--
-- TOC entry 3 (class 3079 OID 53866)
-- Name: pg_trgm; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;


--
-- TOC entry 3397 (class 0 OID 0)
-- Dependencies: 3
-- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner: 
--

COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams';


--
-- TOC entry 2 (class 3079 OID 53931)
-- Name: unaccent; Type: EXTENSION; Schema: -; Owner: 
--

CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public;


--
-- TOC entry 3398 (class 0 OID 0)
-- Dependencies: 2
-- Name: EXTENSION unaccent; Type: COMMENT; Schema: -; Owner: 
--

COMMENT ON EXTENSION unaccent IS 'text search dictionary that removes accents';


--
-- TOC entry 392 (class 1255 OID 53938)
-- Name: set_all_ts_search(); Type: FUNCTION; Schema: ardoc; Owner: postgres
--

CREATE FUNCTION ardoc.set_all_ts_search() RETURNS void
    LANGUAGE plpgsql
    AS $$
DECLARE 
	rec RECORD; 
	rec1 RECORD;
BEGIN
	--Search all archives
	FOR rec IN SELECT id FROM ardoc.tb_archive 
	LOOP
	    SELECT ardoc.set_ts_search(rec.id) INTO rec1;
	END LOOP;
END;
$$;


ALTER FUNCTION ardoc.set_all_ts_search() OWNER TO postgres;

--
-- TOC entry 393 (class 1255 OID 53939)
-- Name: set_code_meuble(); Type: FUNCTION; Schema: ardoc; Owner: postgres
--

CREATE FUNCTION ardoc.set_code_meuble() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
	IF NEW.code IS NULL THEN
		NEW.code = get_code('tb_meuble');
	END IF;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION ardoc.set_code_meuble() OWNER TO postgres;

--
-- TOC entry 3399 (class 0 OID 0)
-- Dependencies: 393
-- Name: FUNCTION set_code_meuble(); Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON FUNCTION ardoc.set_code_meuble() IS 'Met à jour l''attribut code de la table tb_meuble';


--
-- TOC entry 394 (class 1255 OID 53940)
-- Name: set_code_rayonnage(); Type: FUNCTION; Schema: ardoc; Owner: postgres
--

CREATE FUNCTION ardoc.set_code_rayonnage() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
	IF NEW.code IS NULL THEN
		NEW.code = get_code('tb_rayonnage');
	END IF;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION ardoc.set_code_rayonnage() OWNER TO postgres;

--
-- TOC entry 3400 (class 0 OID 0)
-- Dependencies: 394
-- Name: FUNCTION set_code_rayonnage(); Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON FUNCTION ardoc.set_code_rayonnage() IS 'Met à jour l''attribut code de la table tb_rayonnage';


--
-- TOC entry 395 (class 1255 OID 53941)
-- Name: set_contenant_archive_add(); Type: FUNCTION; Schema: ardoc; Owner: postgres
--

CREATE FUNCTION ardoc.set_contenant_archive_add() RETURNS trigger
    LANGUAGE plpgsql
    AS $$

DECLARE
   rec record;
BEGIN
	IF NEW.idcontenant IS NOT NULL THEN
		UPDATE ardoc.tb_contenant SET numerodebut=COALESCE(LEAST(numerodebut, NEW.numerodebut, NEW.numeroarchive), 0), numerofin=COALESCE(GREATEST(numerofin, NEW.numerofin, NEW.numeroarchive), 0), 
		datedebut=GREATEST(datedebut, NEW.datedebut, NEW.datearchive), datefin=GREATEST(datefin, NEW.datefin, NEW.datearchive), 
		dua=GREATEST(dua::int, date_part('year', NEW.dua)::int)::text, duc=GREATEST(duc::int, date_part('year', NEW.duc)::int)::text, hasarchive=1 WHERE id=NEW.idcontenant;
	END IF;
	IF NEW.code IS NULL THEN
		NEW.code = get_code('tb_archive_physique');
	END IF;
	IF NEW.idsecurite IS NULL THEN
		NEW.idsecurite = (SELECT id FROM tb_securite WHERE defaut=1);
	END IF;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION ardoc.set_contenant_archive_add() OWNER TO postgres;

--
-- TOC entry 3401 (class 0 OID 0)
-- Dependencies: 395
-- Name: FUNCTION set_contenant_archive_add(); Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON FUNCTION ardoc.set_contenant_archive_add() IS 'Met à jour l''attribut hasarchive de la table tb_contenant';


--
-- TOC entry 396 (class 1255 OID 53942)
-- Name: set_contenant_archive_delete(); Type: FUNCTION; Schema: ardoc; Owner: postgres
--

CREATE FUNCTION ardoc.set_contenant_archive_delete() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
DECLARE
   rec record;
BEGIN
	IF OLD.idcontenant IS NOT NULL THEN
		select MIN(numerodebut) AS numerodebut, MAX(numerofin) AS numerofin, MIN(numeroarchive) AS minnumeroarchive, MAX(numeroarchive) AS maxnumeroarchive, MIN(datedebut) AS datedebut, MAX(datefin) AS datefin, 
		MIN(datearchive) AS mindatearchive, MAX(datearchive) AS maxdatearchive, MAX(dua) AS dua, MAX(duc) AS duc INTO rec from ardoc.tb_archive WHERE idcontenant=OLD.idcontenant;
		IF FOUND rec THEN
			UPDATE ardoc.tb_contenant SET numerodebut=LEAST(rec.numerodebut, rec.minnumeroarchive), numerofin=GREATEST(rec.numerofin, rec.maxnumeroarchive), datedebut=LEAST(rec.datedebut, rec.mindatearchive), 
			datefin=GREATEST(rec.datefin, rec.maxdatearchive), dua = date_part('year', rec.dua), duc = date_part('year', rec.duc), hasarchive=1 WHERE id=OLD.idcontenant;
		ELSE 
			UPDATE ardoc.tb_contenant SET numerodebut=NULL, numerofin=NULL, datedebut = NULL, datefin = NULL, dua=NULL, hasarchive=0  WHERE id = OLD.idcontenant;
		END IF;
	END IF;
	RETURN NEW;		
END;
$$;


ALTER FUNCTION ardoc.set_contenant_archive_delete() OWNER TO postgres;

--
-- TOC entry 3402 (class 0 OID 0)
-- Dependencies: 396
-- Name: FUNCTION set_contenant_archive_delete(); Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON FUNCTION ardoc.set_contenant_archive_delete() IS 'Met à jour l''attribut hasarchive de la table tb_contenant lors de la suppression';


--
-- TOC entry 397 (class 1255 OID 53943)
-- Name: set_contenant_archive_edit(); Type: FUNCTION; Schema: ardoc; Owner: postgres
--

CREATE FUNCTION ardoc.set_contenant_archive_edit() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
DECLARE
   rec record;
BEGIN
	IF (NEW.idcontenant IS NOT NULL) THEN 
		select MIN(numerodebut) AS numerodebut, MAX(numerofin) AS numerofin, MIN(numeroarchive) AS minnumeroarchive, MAX(numeroarchive) AS maxnumeroarchive, MIN(datedebut) AS datedebut, MAX(datefin) AS datefin, MIN(datearchive) AS mindatearchive, MAX(datearchive) AS maxdatearchive, MAX(dua) AS dua, MAX(duc) AS duc INTO rec from ardoc.tb_archive WHERE idcontenant=NEW.idcontenant;
		IF FOUND rec THEN
			UPDATE ardoc.tb_contenant SET numerodebut=LEAST(rec.numerodebut, rec.minnumeroarchive), numerofin=GREATEST(rec.numerofin, rec.maxnumeroarchive), datedebut=LEAST(rec.datedebut, rec.mindatearchive), datefin=GREATEST(rec.datefin, rec.maxdatearchive), dua = date_part('year', rec.dua), duc = date_part('year', rec.duc), hasarchive=1 WHERE id=NEW.idcontenant;
		END IF;
	ELSEIF OLD.idcontenant IS NOT NULL THEN
		select MIN(numerodebut) AS numerodebut, MAX(numerofin) AS numerofin, MIN(numeroarchive) AS minnumeroarchive, MAX(numeroarchive) AS maxnumeroarchive, MIN(datedebut) AS datedebut, MAX(datefin) AS datefin, MIN(datearchive) AS mindatearchive, MAX(datearchive) AS maxdatearchive, MAX(dua) AS dua,  MAX(duc) AS duc INTO rec from ardoc.tb_archive WHERE idcontenant=OLD.idcontenant;
		
		IF FOUND rec THEN
			UPDATE ardoc.tb_contenant SET numerodebut=LEAST(rec.numerodebut, rec.minnumeroarchive), numerofin=GREATEST(rec.numerofin, rec.maxnumeroarchive), datedebut=LEAST(rec.datedebut, rec.mindatearchive), datefin=GREATEST(rec.datefin, rec.maxdatearchive), dua = date_part('year', rec.dua), duc = date_part('year', rec.duc), hasarchive=1 WHERE id=OLD.idcontenant;
		ELSE 
			UPDATE ardoc.tb_contenant SET numerodebut=NULL, numerofin=NULL, datedebut = NULL, datefin = NULL, dua=NULL, duc=NULL, hasarchive=0  WHERE id = OLD.idcontenant;	
		END IF;
	END IF;	
	RETURN NEW;	
END;
$$;


ALTER FUNCTION ardoc.set_contenant_archive_edit() OWNER TO postgres;

--
-- TOC entry 3403 (class 0 OID 0)
-- Dependencies: 397
-- Name: FUNCTION set_contenant_archive_edit(); Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON FUNCTION ardoc.set_contenant_archive_edit() IS 'Met à jour l''attribut hasarchive de la table tb_contenant';


--
-- TOC entry 398 (class 1255 OID 53944)
-- Name: set_size_add(); Type: FUNCTION; Schema: ardoc; Owner: postgres
--

CREATE FUNCTION ardoc.set_size_add() RETURNS trigger
    LANGUAGE plpgsql
    AS $$

DECLARE
   rec record;
BEGIN
	IF(coalesce(NEW.idmeuble, 0)>0) THEN
		UPDATE ardoc.tb_meuble SET taille_totale=taille_totale + NEW.capacite WHERE id=NEW.idmeuble;
	ELSEIF(coalesce(NEW.idrayonnage, 0)>0) THEN
		UPDATE ardoc.tb_rayonnage SET taille_totale=taille_totale + NEW.capacite WHERE id=NEW.idrayonnage;
	ELSEIF(coalesce(NEW.idcontenant, 0)>0) THEN
		select MIN(numerodebut) AS numerodebut, MAX(numerofin) AS numerofin, MIN(datedebut) AS datedebut, MAX(datefin) AS datefin, MAX(dua) AS dua INTO rec from ardoc.tb_contenant WHERE idcontenant=NEW.idcontenant;
		IF FOUND rec THEN
			UPDATE ardoc.tb_contenant SET numerodebut=rec.numerodebut, numerofin=rec.numerofin, datedebut=rec.datedebut, datefin=rec.datefin, dua = rec.dua, taille_totale=taille_totale + NEW.capacite WHERE id=NEW.idcontenant;	
		END IF;	
	END IF;
	IF NEW.code IS NULL THEN
		NEW.code = get_code('tb_contenant');
	END IF;
	IF NEW.idsecurite IS NULL THEN
		NEW.idsecurite = (SELECT id FROM tb_securite WHERE defaut=1);
	END IF;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION ardoc.set_size_add() OWNER TO postgres;

--
-- TOC entry 3404 (class 0 OID 0)
-- Dependencies: 398
-- Name: FUNCTION set_size_add(); Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON FUNCTION ardoc.set_size_add() IS 'Met à jour le taille totale lors de l''ajout';


--
-- TOC entry 399 (class 1255 OID 53945)
-- Name: set_size_delete(); Type: FUNCTION; Schema: ardoc; Owner: postgres
--

CREATE FUNCTION ardoc.set_size_delete() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
DECLARE
BEGIN
	IF(OLD.idmeuble IS NOT NULL) THEN
		UPDATE ardoc.tb_meuble SET taille_totale = taille_totale - OLD.capacite  WHERE id = OLD.idmeuble;
	ELSEIF(OLD.idrayonnage IS NOT NULL) THEN
		UPDATE ardoc.tb_rayonnage SET taille_totale = taille_totale - OLD.capacite  WHERE id = OLD.idrayonnage;
	ELSEIF(OLD.idcontenant IS NOT NULL) THEN
		UPDATE ardoc.tb_contenant SET taille_totale = taille_totale - OLD.capacite  WHERE id = OLD.idcontenant;	
	END IF;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION ardoc.set_size_delete() OWNER TO postgres;

--
-- TOC entry 3405 (class 0 OID 0)
-- Dependencies: 399
-- Name: FUNCTION set_size_delete(); Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON FUNCTION ardoc.set_size_delete() IS 'Met à jour le taille totale lors de la suppression';


--
-- TOC entry 400 (class 1255 OID 53946)
-- Name: set_size_edit(); Type: FUNCTION; Schema: ardoc; Owner: postgres
--

CREATE FUNCTION ardoc.set_size_edit() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
DECLARE
   rec record;
BEGIN
	IF (NEW.onsa>0) THEN
		IF (OLD.idrayonnage IS NULL AND NEW.idrayonnage IS NOT NULL) THEN --It's add
			UPDATE ardoc.tb_rayonnage SET taille_totale = taille_totale + NEW.capacite  WHERE id = NEW.idrayonnage ;
		ELSEIF (NEW.idrayonnage IS NOT NULL AND OLD.idrayonnage IS NOT NULL AND NEW.idrayonnage<>OLD.idrayonnage) THEN
			UPDATE ardoc.tb_rayonnage SET taille_totale = taille_totale - OLD.capacite  WHERE id = OLD.idrayonnage;
			UPDATE ardoc.tb_rayonnage SET taille_totale = taille_totale + NEW.capacite  WHERE id = NEW.idrayonnage;
		ELSEIF (NEW.idrayonnage IS NULL AND OLD.idrayonnage IS NOT NULL) THEN
			UPDATE ardoc.tb_rayonnage SET taille_totale = taille_totale - OLD.capacite  WHERE id = OLD.idrayonnage;
		ELSEIF (OLD.idcontenant IS NULL AND NEW.idcontenant IS NOT NULL) THEN --It's add
			UPDATE ardoc.tb_contenant SET taille_totale = taille_totale + NEW.capacite  WHERE id = NEW.idcontenant ;
		ELSEIF (NEW.idcontenant IS NOT NULL AND OLD.idcontenant IS NOT NULL AND NEW.idcontenant<>OLD.idcontenant) THEN
			UPDATE ardoc.tb_contenant SET taille_totale = taille_totale - OLD.capacite  WHERE id = OLD.idcontenant;
			UPDATE ardoc.tb_contenant SET taille_totale = taille_totale + NEW.capacite  WHERE id = NEW.idcontenant;
		ELSEIF (NEW.idcontenant IS NULL AND OLD.idcontenant IS NOT NULL) THEN
			UPDATE ardoc.tb_contenant SET taille_totale = taille_totale - OLD.capacite  WHERE id = OLD.idcontenant;
		END IF;
		--raise NOTICE  'id versement: %', NEW.idversement;
	ELSE
		-- raise NOTICE  'new id meuble: %', NEW.idmeuble;
		-- raise NOTICE  'old id meuble: %', OLD.idmeuble;
		IF (NEW.idmeuble = OLD.idmeuble) THEN -- On a peut être changé la taille
			UPDATE ardoc.tb_meuble SET taille_totale = taille_totale + (NEW.capacite - OLD.capacite)  WHERE id = NEW.idmeuble ;
		ELSEIF (NEW.idmeuble IS NOT NULL AND OLD.idmeuble IS NULL) THEN -- On range de nouveau dans un meuble
			UPDATE ardoc.tb_meuble SET taille_totale = taille_totale + NEW.capacite  WHERE id = NEW.idmeuble;
		ELSEIF (NEW.idmeuble IS NULL AND OLD.idmeuble IS NOT NULL) THEN	-- On enlève d'un meuble
			UPDATE ardoc.tb_meuble SET taille_totale = taille_totale - OLD.capacite  WHERE id = OLD.idmeuble;
		ELSEIF (NEW.idmeuble IS NOT NULL AND OLD.idmeuble IS NOT NULL) THEN	-- On déplace d'un meuble à un autre
			UPDATE ardoc.tb_meuble SET taille_totale = taille_totale - OLD.capacite  WHERE id = OLD.idmeuble;
			UPDATE ardoc.tb_meuble SET taille_totale = taille_totale + NEW.capacite  WHERE id = NEW.idmeuble;
		END IF;
		select MIN(numerodebut) AS numerodebut, MAX(numerofin) AS numerofin, MIN(datedebut) AS datedebut, MAX(datefin) AS datefin, MAX(dua) AS dua, MAX(duc) AS duc INTO rec from ardoc.tb_contenant WHERE idcontenant=NEW.idcontenant;
		IF FOUND rec THEN
			UPDATE ardoc.tb_contenant SET numerodebut=rec.numerodebut, numerofin=rec.numerofin, datedebut=rec.datedebut, datefin=rec.datefin, dua = rec.dua, duc = rec.duc WHERE id=NEW.idcontenant;
		ELSE 
		UPDATE ardoc.tb_contenant SET numerodebut=NULL, numerofin=NULL, datedebut = NULL, datefin = NULL, dua=NULL, duc=NULL WHERE id = OLD.idcontenant;	
		END IF;
		IF (NEW.idcontenant = OLD.idcontenant) THEN
			UPDATE ardoc.tb_contenant SET taille_totale = taille_totale + (NEW.capacite - OLD.capacite)  WHERE id = NEW.idcontenant ;
		ELSE
			UPDATE ardoc.tb_contenant SET taille_totale = taille_totale - OLD.capacite  WHERE id = OLD.idcontenant;
			UPDATE ardoc.tb_contenant SET taille_totale = taille_totale + NEW.capacite  WHERE id = NEW.idcontenant;
		END IF;
		IF(NEW.statut <> OLD.statut OR NEW.estactif <> OLD.estactif) THEN
			UPDATE ardoc.tb_contenant SET estactif = NEW.estactif, statut = NEW.statut  WHERE idcontenant = NEW.id ;
		END IF;	
	END IF;
	IF (NEW.idversement is distinct from OLD.idversement) THEN
		select MIN(idversement) AS idversement INTO rec from ardoc.tb_contenant WHERE idcontenant=NEW.idcontenant GROUP BY idversement;
		IF FOUND rec THEN
			IF rec.idversement IS NULL THEN
				-- raise NOTICE  'FOUND record: %', rec.idversement;
				UPDATE ardoc.tb_contenant SET idversement = NULL WHERE id=NEW.idcontenant;
			ELSE
				UPDATE ardoc.tb_contenant SET idversement = rec.idversement, statut='Ouvert' WHERE id=NEW.idcontenant;
			END IF;				
		END IF;	 
	END IF;
	RETURN NEW;
END;
$$;


ALTER FUNCTION ardoc.set_size_edit() OWNER TO postgres;

--
-- TOC entry 3406 (class 0 OID 0)
-- Dependencies: 400
-- Name: FUNCTION set_size_edit(); Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON FUNCTION ardoc.set_size_edit() IS 'Met à jour l''attribut hasarchive de la table tb_contenant';


--
-- TOC entry 401 (class 1255 OID 53947)
-- Name: set_ts_search(integer); Type: FUNCTION; Schema: ardoc; Owner: postgres
--

CREATE FUNCTION ardoc.set_ts_search(_idarchive integer) RETURNS void
    LANGUAGE plpgsql
    AS $$
DECLARE rec record;
BEGIN
	--Search metadata archive
	SELECT string_agg(valeur, ' ') AS valeur INTO rec
	FROM    ardoc.tb_archive_metadata
	WHERE   idarchive=_idarchive;
	IF FOUND rec THEN
		UPDATE ardoc.tb_archive g SET ts_search=to_tsvector('french', concat_ws(' ', g.code, unaccent(g.titre), unaccent(g.description), g.sof, g.numeroarchive::text, g.codefond, unaccent(c.libelle),unaccent(ct.libelle), unaccent(mi.libelle), 
		unaccent(s.libelle), unaccent(a.libelle), unaccent(d.libelle), unaccent(aut.nom), unaccent(ent.libelle),  unaccent(rec.valeur)))
		FROM ardoc.tb_archive g1
		LEFT JOIN ardoc.tb_contenant ct ON g1.idcontenant=ct.id
		LEFT JOIN tb_modeleindexation mi ON g1.idmodeleindexation=mi.id
		LEFT JOIN tb_affaire a ON g1.idaffaire=a.id
		LEFT JOIN tb_dossier d ON g1.iddossier=d.id
		LEFT JOIN tb_classement c ON g1.idclassement=c.id
		LEFT JOIN tb_securite s ON g1.idsecurite=s.id
		LEFT JOIN ardoc.tb_auteur aut ON g1.idauteur=aut.id
		LEFT JOIN tb_entite ent ON g1.identite=ent.id		
		WHERE g.id=_idarchive AND g1.id=g.id;
	END IF;
END;
$$;


ALTER FUNCTION ardoc.set_ts_search(_idarchive integer) OWNER TO postgres;

--
-- TOC entry 402 (class 1255 OID 53948)
-- Name: set_tsvector(); Type: FUNCTION; Schema: ardoc; Owner: postgres
--

CREATE FUNCTION ardoc.set_tsvector() RETURNS trigger
    LANGUAGE plpgsql
    AS $$BEGIN
	NEW.ts_search=to_tsvector('french', unaccent(NEW.valeur));
	RETURN NEW;
END;$$;


ALTER FUNCTION ardoc.set_tsvector() OWNER TO postgres;

--
-- TOC entry 3407 (class 0 OID 0)
-- Dependencies: 402
-- Name: FUNCTION set_tsvector(); Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON FUNCTION ardoc.set_tsvector() IS 'Permet d''appliquer la fonction ts_vector à la colonne value à chaque insertion dans la table tb_archive_metadata';


--
-- TOC entry 403 (class 1255 OID 53949)
-- Name: convert_time(integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.convert_time(_minutes integer) RETURNS text
    LANGUAGE plpgsql
    AS $$
declare
	_h integer; 
	_m integer; 
	_d integer;
	_return text = '';
  BEGIN
	_h = FLOOR(_minutes/60);
	_m = _minutes - (_h*60);
	_d = FLOOR(_h/24);
	_h = _h - _d * 24;
	IF(_d > 0) THEN
		_return = _d || 'jour';
		IF _d>1 THEN
			_return = _return || 's';
		END IF;
		_return = _return || ' ';
	END IF;
	IF _h > 0 THEN
		_return = _return || _h || 'heure';
		IF _h>1 THEN
			_return = _return || 's';
		END IF;
		_return = _return || ' ';
	END IF;
	IF _m > 0 THEN
		_return = _return || _m || 'minute';
		IF _m>1 THEN
			_return = _return || 's';
		END IF;
	END IF;   
	return _return;
  END;
$$;


ALTER FUNCTION public.convert_time(_minutes integer) OWNER TO postgres;

--
-- TOC entry 404 (class 1255 OID 53950)
-- Name: convert_time(bigint); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.convert_time(_minutes bigint) RETURNS text
    LANGUAGE plpgsql
    AS $$
declare
	_h integer; 
	_m integer; 
	_d integer;
	_return text = '';
  BEGIN
	_h = FLOOR(_minutes/60);
	_m = _minutes - (_h*60);
	_d = FLOOR(_h/24);
	_h = _h - _d * 24;
	IF(_d > 0) THEN
		_return = _d || 'jour';
		IF _d>1 THEN
			_return = _return || 's';
		END IF;
		_return = _return || ' ';
	END IF;
	IF _h > 0 THEN
		_return = _return || _h || 'heure';
		IF _h>1 THEN
			_return = _return || 's';
		END IF;
		_return = _return || ' ';
	END IF;
	IF _m > 0 THEN
		_return = _return || _m || 'minute';
		IF _m>1 THEN
			_return = _return || 's';
		END IF;
	END IF;   
	return _return;
  END;
$$;


ALTER FUNCTION public.convert_time(_minutes bigint) OWNER TO postgres;

--
-- TOC entry 405 (class 1255 OID 53951)
-- Name: get_code(text); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.get_code(table_name text) RETURNS text
    LANGUAGE plpgsql
    AS $$
DECLARE rec record;
BEGIN
	SELECT numerocours, chainegauche, longueur, chainedroite INTO rec
	FROM    tb_code
	WHERE   entite LIKE table_name;
	IF FOUND rec THEN
		UPDATE tb_code SET numerocours=rec.numerocours+1 WHERE entite LIKE table_name;
		RETURN CONCAT(rec.chainegauche, lpad(rec.numerocours::text, rec.longueur::int, '0'), rec.chainedroite);
	ELSE
		RETURN NULL;
	END IF;
END;
$$;


ALTER FUNCTION public.get_code(table_name text) OWNER TO postgres;

--
-- TOC entry 406 (class 1255 OID 53952)
-- Name: set_code_affaire(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.set_code_affaire() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
	IF NEW.code IS NULL THEN
		NEW.code = get_code('tb_affaire');
	END IF;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION public.set_code_affaire() OWNER TO postgres;

--
-- TOC entry 3408 (class 0 OID 0)
-- Dependencies: 406
-- Name: FUNCTION set_code_affaire(); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION public.set_code_affaire() IS 'Met à jour l''attribut code de la table tb_affaire';


--
-- TOC entry 407 (class 1255 OID 53953)
-- Name: set_hasdossier_add(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.set_hasdossier_add() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
	UPDATE tb_classement SET hasdossier=1 WHERE id=NEW.idclassement AND hasdossier=0;
	UPDATE tb_dossier SET hasdossier=1 WHERE id=NEW.idparent AND hasdossier=0;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION public.set_hasdossier_add() OWNER TO postgres;

--
-- TOC entry 3409 (class 0 OID 0)
-- Dependencies: 407
-- Name: FUNCTION set_hasdossier_add(); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION public.set_hasdossier_add() IS 'Met à jour l''attribut hasdossier de la table tb_classement';


--
-- TOC entry 408 (class 1255 OID 53954)
-- Name: set_hasdossier_delete(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.set_hasdossier_delete() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
	UPDATE tb_classement SET hasdossier=0  WHERE id = OLD.idclassement AND ( SELECT COUNT(*) FROM tb_dossier WHERE idclassement = OLD.idclassement AND id<>OLD.id) = 0;
	UPDATE tb_dossier SET hasdossier=0  WHERE id = OLD.idparent AND ( SELECT COUNT(*) FROM tb_dossier WHERE id<>OLD.id AND idparent=OLD.idparent) = 0;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION public.set_hasdossier_delete() OWNER TO postgres;

--
-- TOC entry 3410 (class 0 OID 0)
-- Dependencies: 408
-- Name: FUNCTION set_hasdossier_delete(); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION public.set_hasdossier_delete() IS 'Met à jour l''attribut hasdossier de la table tb_classement lors de la suppression';


--
-- TOC entry 409 (class 1255 OID 53955)
-- Name: set_hasdossier_edit(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.set_hasdossier_edit() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
	UPDATE tb_classement SET hasdossier=0  WHERE id=OLD.idclassement AND ( SELECT COUNT(*) FROM tb_dossier WHERE idclassement = OLD.idclassement AND id<> OLD.id) = 0 AND OLD.idclassement>0;
		UPDATE tb_classement SET hasdossier=1 WHERE id=NEW.idclassement AND hasdossier=0 AND NEW.idclassement>0;

		UPDATE tb_dossier SET hasdossier=0  WHERE id=OLD.idparent AND ( SELECT COUNT(*) FROM tb_dossier WHERE id<> OLD.id AND idparent=OLD.idparent) = 0 AND OLD.idparent>0;
	UPDATE tb_dossier SET hasdossier=1 WHERE id=NEW.idparent AND hasdossier=0 AND NEW.idparent>0;
	RETURN NEW;
END;
$$;


ALTER FUNCTION public.set_hasdossier_edit() OWNER TO postgres;

--
-- TOC entry 3411 (class 0 OID 0)
-- Dependencies: 409
-- Name: FUNCTION set_hasdossier_edit(); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION public.set_hasdossier_edit() IS 'Met à jour l''attribut hasdossier de la table tb_classement';


--
-- TOC entry 410 (class 1255 OID 53956)
-- Name: set_hasentite_add(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.set_hasentite_add() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
	UPDATE tb_entite SET hasentite=1 WHERE id=NEW.idparent AND hasentite=0;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION public.set_hasentite_add() OWNER TO postgres;

--
-- TOC entry 3412 (class 0 OID 0)
-- Dependencies: 410
-- Name: FUNCTION set_hasentite_add(); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION public.set_hasentite_add() IS 'Met à jour l''attribut hasentite de la table tb_entite';


--
-- TOC entry 411 (class 1255 OID 53957)
-- Name: set_hasentite_delete(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.set_hasentite_delete() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
	UPDATE tb_entite SET hasentite=0  WHERE id = OLD.idparent AND ( SELECT COUNT(*) FROM tb_entite WHERE id<>OLD.id AND idparent=OLD.idparent) = 0;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION public.set_hasentite_delete() OWNER TO postgres;

--
-- TOC entry 3413 (class 0 OID 0)
-- Dependencies: 411
-- Name: FUNCTION set_hasentite_delete(); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION public.set_hasentite_delete() IS 'Met à jour l''attribut hasentite de la table tb_entite lors de la suppression';


--
-- TOC entry 412 (class 1255 OID 53958)
-- Name: set_hasentite_edit(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.set_hasentite_edit() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
	UPDATE tb_entite SET hasentite=0  WHERE id=OLD.idparent AND ( SELECT COUNT(*) FROM tb_entite WHERE id<> OLD.id AND idparent=OLD.idparent) = 0 AND OLD.idparent>0;
	UPDATE tb_entite SET hasentite=1 WHERE id=NEW.idparent AND hasentite=0 AND NEW.idparent>0;
	RETURN NEW;
END;
$$;


ALTER FUNCTION public.set_hasentite_edit() OWNER TO postgres;

--
-- TOC entry 3414 (class 0 OID 0)
-- Dependencies: 412
-- Name: FUNCTION set_hasentite_edit(); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION public.set_hasentite_edit() IS 'Met à jour l''attribut hasentite de la table tb_entite';


--
-- TOC entry 413 (class 1255 OID 53959)
-- Name: set_hasserie_add(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.set_hasserie_add() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
	UPDATE tb_classement SET hasserie=1 WHERE id=NEW.idparent AND hasserie=0;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION public.set_hasserie_add() OWNER TO postgres;

--
-- TOC entry 3415 (class 0 OID 0)
-- Dependencies: 413
-- Name: FUNCTION set_hasserie_add(); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION public.set_hasserie_add() IS 'Met à jour l''attribut hasserie de la table tb_classement';


--
-- TOC entry 414 (class 1255 OID 53960)
-- Name: set_hasserie_delete(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.set_hasserie_delete() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
	UPDATE tb_classement SET hasserie=0  WHERE id = OLD.idparent AND ( SELECT COUNT(*) FROM tb_classement WHERE id<>OLD.id AND idparent=OLD.idparent) = 0;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION public.set_hasserie_delete() OWNER TO postgres;

--
-- TOC entry 3416 (class 0 OID 0)
-- Dependencies: 414
-- Name: FUNCTION set_hasserie_delete(); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION public.set_hasserie_delete() IS 'Met à jour l''attribut hasserie de la table tb_classement lors de la suppression';


--
-- TOC entry 415 (class 1255 OID 53961)
-- Name: set_hasserie_edit(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.set_hasserie_edit() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
	UPDATE tb_classement SET hasserie=0  WHERE id=OLD.idparent AND ( SELECT COUNT(*) FROM tb_classement WHERE id<> OLD.id AND idparent=OLD.idparent) = 0 AND OLD.idparent>0;
	UPDATE tb_classement SET hasserie=1 WHERE id=NEW.idparent AND hasserie=0 AND NEW.idparent>0;
	RETURN NEW;
END;
$$;


ALTER FUNCTION public.set_hasserie_edit() OWNER TO postgres;

--
-- TOC entry 3417 (class 0 OID 0)
-- Dependencies: 415
-- Name: FUNCTION set_hasserie_edit(); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION public.set_hasserie_edit() IS 'Met à jour l''attribut hasserie de la table tb_classement';


--
-- TOC entry 416 (class 1255 OID 53962)
-- Name: set_traitement(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.set_traitement() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
DECLARE
   rec record;
BEGIN
	IF NEW.esttraite=1 AND OLD.esttraite=0 THEN 
		--On marque comme traité tous les traitements redirigés
		UPDATE tb_redirection_traitement SET esttraite=1, idagenttraiteur=NEW.idagenttraiteur, datetraitement=NEW.datetraitement WHERE id IN 
		(select rt.id from tb_redirection_traitement rt JOIN tb_redirection r ON  rt.idredirection=r.id WHERE rt.idtraitement=NEW.idtraitement AND r.idexpediteur=NEW.idagenttraiteur);
		SELECT id INTO rec FROM tb_redirection_traitement WHERE idredirection = NEW.idredirection AND esttraite = 0;
		IF FOUND rec THEN
			UPDATE tb_redirection r SET etat=1 WHERE r.id=NEW.idredirection;
		ELSE 
			UPDATE tb_redirection r SET etat=2 WHERE r.id=NEW.idredirection;
		END IF;	
		
	END IF;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION public.set_traitement() OWNER TO postgres;

--
-- TOC entry 3418 (class 0 OID 0)
-- Dependencies: 416
-- Name: FUNCTION set_traitement(); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION public.set_traitement() IS 'Met à jour le l''état des traitements lors de la validation d''une redirection';


--
-- TOC entry 417 (class 1255 OID 53963)
-- Name: set_tsvector_document(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.set_tsvector_document() RETURNS trigger
    LANGUAGE plpgsql
    AS $$BEGIN
	NEW.ts_search=to_tsvector('french', unaccent(NEW.fulltext));
	RETURN NEW;
END;$$;


ALTER FUNCTION public.set_tsvector_document() OWNER TO postgres;

--
-- TOC entry 3419 (class 0 OID 0)
-- Dependencies: 417
-- Name: FUNCTION set_tsvector_document(); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION public.set_tsvector_document() IS 'Permet d''appliquer la fonction ts_vector à la colonne fulltext à chaque insertion dans la table tb_document';


--
-- TOC entry 418 (class 1255 OID 53964)
-- Name: set_utilisateur_historique_add(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.set_utilisateur_historique_add() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
DECLARE rec record;
BEGIN
	IF NEW.idutilisateur IS NOT NULL THEN
		SELECT CONCAT(CASE WHEN nom IS NULL THEN NULL ELSE nom END, CASE WHEN prenom IS NULL THEN NULL ELSE CONCAT(' ', prenom) END, CASE WHEN fonction IS NULL THEN NULL ELSE CONCAT(' (', fonction ,')') END) AS utilisateur INTO rec
		FROM    tb_utilisateur
		WHERE   id = NEW.idutilisateur;
		IF FOUND rec THEN
			NEW.utilisateur = rec.utilisateur;
		END IF;
	END IF;
	RETURN NEW;	
END;
$$;


ALTER FUNCTION public.set_utilisateur_historique_add() OWNER TO postgres;

--
-- TOC entry 3420 (class 0 OID 0)
-- Dependencies: 418
-- Name: FUNCTION set_utilisateur_historique_add(); Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON FUNCTION public.set_utilisateur_historique_add() IS 'Met à jour les informations sur l''utilisateur';


--
-- TOC entry 419 (class 1255 OID 53965)
-- Name: set_all_ts_search(); Type: FUNCTION; Schema: starged; Owner: postgres
--

CREATE FUNCTION starged.set_all_ts_search() RETURNS void
    LANGUAGE plpgsql
    AS $$
DECLARE 
	rec RECORD; 
	rec1 RECORD;
BEGIN
	--Search all archives
	FOR rec IN SELECT id FROM starged.tb_archive 
	LOOP
	    SELECT starged.set_ts_search(rec.id) INTO rec1;
	END LOOP;
END;
$$;


ALTER FUNCTION starged.set_all_ts_search() OWNER TO postgres;

--
-- TOC entry 420 (class 1255 OID 53966)
-- Name: set_ts_search(integer); Type: FUNCTION; Schema: starged; Owner: postgres
--

CREATE FUNCTION starged.set_ts_search(_idarchive integer) RETURNS void
    LANGUAGE plpgsql
    AS $$
DECLARE rec record;
BEGIN
	--Search metadata archive
	SELECT string_agg(valeur, ' ') AS valeur INTO rec
	FROM    starged.tb_archive_metadata
	WHERE   idarchive=_idarchive;
	IF FOUND rec THEN
		UPDATE starged.tb_archive g SET ts_search=to_tsvector('french', concat_ws(' ', g.code, unaccent(g.titre), unaccent(g.description), unaccent(a.libelle), unaccent(d.libelle), 
		unaccent(c.libelle), unaccent(s.libelle), unaccent(mi.libelle), unaccent(rec.valeur)))
		FROM starged.tb_archive g1
		LEFT JOIN tb_affaire a ON g1.idaffaire=a.id
		LEFT JOIN tb_dossier d ON g1.iddossier=d.id
		LEFT JOIN tb_classement c ON g1.idclassement=c.id
		LEFT JOIN tb_securite s ON g1.idsecurite=s.id
		LEFT JOIN tb_modeleindexation mi ON mi.id=g1.idmodeleindexation
		WHERE g.id=_idarchive AND g1.id=g.id;
	END IF;
END;
$$;


ALTER FUNCTION starged.set_ts_search(_idarchive integer) OWNER TO postgres;

--
-- TOC entry 421 (class 1255 OID 53967)
-- Name: set_tsvector(); Type: FUNCTION; Schema: starged; Owner: postgres
--

CREATE FUNCTION starged.set_tsvector() RETURNS trigger
    LANGUAGE plpgsql
    AS $$BEGIN
	NEW.ts_search=to_tsvector('french', unaccent(NEW.valeur));
	RETURN NEW;
END;$$;


ALTER FUNCTION starged.set_tsvector() OWNER TO postgres;

--
-- TOC entry 3421 (class 0 OID 0)
-- Dependencies: 421
-- Name: FUNCTION set_tsvector(); Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON FUNCTION starged.set_tsvector() IS 'Permet d''appliquer la fonction ts_vector à la colonne value à chaque insertion dans la table tb_archive_metadata';




--
-- TOC entry 189 (class 1259 OID 53968)
-- Name: tb_archive; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_archive (
    id integer NOT NULL,
    code character varying(255),
    idauteur integer,
    titre character varying(255),
    datearchive date,
    datedebut date,
    datefin date,
    numerodebut bigint,
    numerofin bigint,
    idclassement integer,
    description text,
    sof character varying(255),
    niveauacces character varying(255),
    idutilisateur integer,
    iddocument integer,
    estserielle integer DEFAULT 0,
    numeroarchive bigint,
    idcontenant integer,
    codefond character varying(255),
    dua date,
    duc date,
    dateenregistrement character varying(255),
    idmodeleindexation integer,
    typeacces character(1) DEFAULT 'g'::bpchar,
    listeacces text,
    identite integer,
    idsecurite integer,
    idaffaire integer,
    iddossier integer,
    completude character varying(255),
    dateregister timestamp without time zone DEFAULT now(),
    ts_search tsvector
);


ALTER TABLE ardoc.tb_archive OWNER TO postgres;

--
-- TOC entry 3422 (class 0 OID 0)
-- Dependencies: 189
-- Name: TABLE tb_archive; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON TABLE ardoc.tb_archive IS 'Liste des archives physiques enregistrées';


--
-- TOC entry 3423 (class 0 OID 0)
-- Dependencies: 189
-- Name: COLUMN tb_archive.code; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive.code IS 'Code de l''archive';


--
-- TOC entry 3424 (class 0 OID 0)
-- Dependencies: 189
-- Name: COLUMN tb_archive.idauteur; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive.idauteur IS 'Auteur de l''archive';


--
-- TOC entry 3425 (class 0 OID 0)
-- Dependencies: 189
-- Name: COLUMN tb_archive.titre; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive.titre IS 'Titre de l''archive';


--
-- TOC entry 3426 (class 0 OID 0)
-- Dependencies: 189
-- Name: COLUMN tb_archive.datearchive; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive.datearchive IS 'Date de l''archive';


--
-- TOC entry 3427 (class 0 OID 0)
-- Dependencies: 189
-- Name: COLUMN tb_archive.idclassement; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive.idclassement IS 'Identifiant de la série du plan de classement';


--
-- TOC entry 3428 (class 0 OID 0)
-- Dependencies: 189
-- Name: COLUMN tb_archive.sof; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive.sof IS 'Sort final de l''archive';


--
-- TOC entry 3429 (class 0 OID 0)
-- Dependencies: 189
-- Name: COLUMN tb_archive.iddocument; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive.iddocument IS 'id du fichier joint';


--
-- TOC entry 3430 (class 0 OID 0)
-- Dependencies: 189
-- Name: COLUMN tb_archive.estserielle; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive.estserielle IS '1 si l''archive est sérielle et 0 sinon par défaut 0';


--
-- TOC entry 3431 (class 0 OID 0)
-- Dependencies: 189
-- Name: COLUMN tb_archive.idcontenant; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive.idcontenant IS 'Identifiant du contenant';


--
-- TOC entry 3432 (class 0 OID 0)
-- Dependencies: 189
-- Name: COLUMN tb_archive.listeacces; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive.listeacces IS ' Liste des id des utilisateurs ou entité ou de l''utilisateur(Cas personnel) ayant accès. Séparateur ,';


--
-- TOC entry 190 (class 1259 OID 53977)
-- Name: tb_archive_destruction; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_archive_destruction (
    id integer NOT NULL,
    auteur text,
    code text,
    titre text,
    sof character varying(255),
    dua date,
    duc date,
    contenant text,
    iddestruction integer
);


ALTER TABLE ardoc.tb_archive_destruction OWNER TO postgres;

--
-- TOC entry 191 (class 1259 OID 53983)
-- Name: tb_archive_destruction_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_archive_destruction_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_archive_destruction_id_seq OWNER TO postgres;

--
-- TOC entry 3433 (class 0 OID 0)
-- Dependencies: 191
-- Name: tb_archive_destruction_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_archive_destruction_id_seq OWNED BY ardoc.tb_archive_destruction.id;


--
-- TOC entry 192 (class 1259 OID 53985)
-- Name: tb_archive_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_archive_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_archive_id_seq OWNER TO postgres;

--
-- TOC entry 3434 (class 0 OID 0)
-- Dependencies: 192
-- Name: tb_archive_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_archive_id_seq OWNED BY ardoc.tb_archive.id;


--
-- TOC entry 193 (class 1259 OID 53987)
-- Name: tb_archive_metadata; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_archive_metadata (
    id integer NOT NULL,
    idarchive integer,
    idmetadata integer,
    ts_search tsvector,
    valeur text,
    estobligatoire integer DEFAULT 1,
    idtableau integer,
    mandatory integer DEFAULT 0,
    idvariable integer,
    idvariabledata integer,
    idcolonne integer
);


ALTER TABLE ardoc.tb_archive_metadata OWNER TO postgres;

--
-- TOC entry 3435 (class 0 OID 0)
-- Dependencies: 193
-- Name: TABLE tb_archive_metadata; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON TABLE ardoc.tb_archive_metadata IS 'Liste des métadonnées des archives';


--
-- TOC entry 3436 (class 0 OID 0)
-- Dependencies: 193
-- Name: COLUMN tb_archive_metadata.id; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive_metadata.id IS 'Identifiant';


--
-- TOC entry 3437 (class 0 OID 0)
-- Dependencies: 193
-- Name: COLUMN tb_archive_metadata.idarchive; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive_metadata.idarchive IS 'Identifiant de l''archive';


--
-- TOC entry 3438 (class 0 OID 0)
-- Dependencies: 193
-- Name: COLUMN tb_archive_metadata.idmetadata; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive_metadata.idmetadata IS 'Identifiant de la métadonnée';


--
-- TOC entry 3439 (class 0 OID 0)
-- Dependencies: 193
-- Name: COLUMN tb_archive_metadata.ts_search; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive_metadata.ts_search IS 'Valeur de l''archive suivant la métadonnée';


--
-- TOC entry 3440 (class 0 OID 0)
-- Dependencies: 193
-- Name: COLUMN tb_archive_metadata.estobligatoire; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_archive_metadata.estobligatoire IS '1 si oui 
0 sinon';


--
-- TOC entry 194 (class 1259 OID 53995)
-- Name: tb_archive_metadata_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_archive_metadata_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_archive_metadata_id_seq OWNER TO postgres;

--
-- TOC entry 3441 (class 0 OID 0)
-- Dependencies: 194
-- Name: tb_archive_metadata_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_archive_metadata_id_seq OWNED BY ardoc.tb_archive_metadata.id;


--
-- TOC entry 195 (class 1259 OID 53997)
-- Name: tb_auteur; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_auteur (
    id integer NOT NULL,
    nom character varying(255)
);


ALTER TABLE ardoc.tb_auteur OWNER TO postgres;

--
-- TOC entry 3442 (class 0 OID 0)
-- Dependencies: 195
-- Name: TABLE tb_auteur; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON TABLE ardoc.tb_auteur IS 'Liste des auteurs des archives';


--
-- TOC entry 3443 (class 0 OID 0)
-- Dependencies: 195
-- Name: COLUMN tb_auteur.nom; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_auteur.nom IS 'Nom et prénom de l''auteur';


--
-- TOC entry 196 (class 1259 OID 54000)
-- Name: tb_auteur_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_auteur_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_auteur_id_seq OWNER TO postgres;

--
-- TOC entry 3444 (class 0 OID 0)
-- Dependencies: 196
-- Name: tb_auteur_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_auteur_id_seq OWNED BY ardoc.tb_auteur.id;


--
-- TOC entry 197 (class 1259 OID 54002)
-- Name: tb_consultation; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_consultation (
    id integer NOT NULL,
    idarchive integer,
    idutilisateur integer,
    dateconsultation character varying(255),
    dconsultation date
);


ALTER TABLE ardoc.tb_consultation OWNER TO postgres;

--
-- TOC entry 3445 (class 0 OID 0)
-- Dependencies: 197
-- Name: TABLE tb_consultation; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON TABLE ardoc.tb_consultation IS 'Table qui enregistre les consultations des archives par les utilisateurs';


--
-- TOC entry 3446 (class 0 OID 0)
-- Dependencies: 197
-- Name: COLUMN tb_consultation.id; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_consultation.id IS 'Identifiant';


--
-- TOC entry 3447 (class 0 OID 0)
-- Dependencies: 197
-- Name: COLUMN tb_consultation.idarchive; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_consultation.idarchive IS 'Identifiant de l''archive';


--
-- TOC entry 3448 (class 0 OID 0)
-- Dependencies: 197
-- Name: COLUMN tb_consultation.idutilisateur; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_consultation.idutilisateur IS 'Identifiant de l''utilisateur';


--
-- TOC entry 198 (class 1259 OID 54005)
-- Name: tb_consultation_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_consultation_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_consultation_id_seq OWNER TO postgres;

--
-- TOC entry 3449 (class 0 OID 0)
-- Dependencies: 198
-- Name: tb_consultation_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_consultation_id_seq OWNED BY ardoc.tb_consultation.id;


--
-- TOC entry 199 (class 1259 OID 54007)
-- Name: tb_contenant; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_contenant (
    id integer NOT NULL,
    idmeuble integer,
    code character varying(255),
    libelle character varying(255),
    idtype integer,
    capacite numeric(10,3) DEFAULT 0,
    idutilisateur integer,
    statut character varying DEFAULT 'Ouvert'::character varying,
    description text,
    idsecurite integer,
    idcontenant integer,
    idrayonnage integer,
    num_tablette integer,
    idversement integer,
    idtransfert integer,
    depth integer DEFAULT 0,
    taille_totale numeric(10,3) DEFAULT 0.00,
    estactif integer DEFAULT 1,
    hasarchive integer DEFAULT 0,
    numerodebut bigint,
    numerofin bigint,
    datedebut date,
    datefin date,
    dua character(4),
    onsa integer DEFAULT 0,
    duc character(4)
);


ALTER TABLE ardoc.tb_contenant OWNER TO postgres;

--
-- TOC entry 3450 (class 0 OID 0)
-- Dependencies: 199
-- Name: TABLE tb_contenant; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON TABLE ardoc.tb_contenant IS 'Liste des contenants';


--
-- TOC entry 3451 (class 0 OID 0)
-- Dependencies: 199
-- Name: COLUMN tb_contenant.idmeuble; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_contenant.idmeuble IS 'Identifiant du meuble où se trouve le contenant';


--
-- TOC entry 3452 (class 0 OID 0)
-- Dependencies: 199
-- Name: COLUMN tb_contenant.code; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_contenant.code IS 'Code du contenant';


--
-- TOC entry 3453 (class 0 OID 0)
-- Dependencies: 199
-- Name: COLUMN tb_contenant.libelle; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_contenant.libelle IS 'Libellé du contenant';


--
-- TOC entry 3454 (class 0 OID 0)
-- Dependencies: 199
-- Name: COLUMN tb_contenant.idtype; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_contenant.idtype IS 'Type du contenant';


--
-- TOC entry 3455 (class 0 OID 0)
-- Dependencies: 199
-- Name: COLUMN tb_contenant.capacite; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_contenant.capacite IS 'Capacité du contenant';


--
-- TOC entry 3456 (class 0 OID 0)
-- Dependencies: 199
-- Name: COLUMN tb_contenant.idutilisateur; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_contenant.idutilisateur IS 'Identifiant de l''utilisateur ayant enregistré le contenant';


--
-- TOC entry 3457 (class 0 OID 0)
-- Dependencies: 199
-- Name: COLUMN tb_contenant.statut; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_contenant.statut IS 'Catégorie du contenant';


--
-- TOC entry 3458 (class 0 OID 0)
-- Dependencies: 199
-- Name: COLUMN tb_contenant.num_tablette; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_contenant.num_tablette IS 'Numéro de la tablette au cas où le contenant est rangé dans un meuble';


--
-- TOC entry 3459 (class 0 OID 0)
-- Dependencies: 199
-- Name: COLUMN tb_contenant.idtransfert; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_contenant.idtransfert IS 'Identifiant du transfert dans lequel se trouve le contenant';


--
-- TOC entry 200 (class 1259 OID 54020)
-- Name: tb_contenant_destruction; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_contenant_destruction (
    id integer NOT NULL,
    code text,
    libelle text,
    dua date,
    duc date,
    cotation text,
    iddestruction integer
);


ALTER TABLE ardoc.tb_contenant_destruction OWNER TO postgres;

--
-- TOC entry 201 (class 1259 OID 54026)
-- Name: tb_contenant_destruction_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_contenant_destruction_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_contenant_destruction_id_seq OWNER TO postgres;

--
-- TOC entry 3460 (class 0 OID 0)
-- Dependencies: 201
-- Name: tb_contenant_destruction_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_contenant_destruction_id_seq OWNED BY ardoc.tb_contenant_destruction.id;


--
-- TOC entry 202 (class 1259 OID 54028)
-- Name: tb_contenant_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_contenant_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_contenant_id_seq OWNER TO postgres;

--
-- TOC entry 3461 (class 0 OID 0)
-- Dependencies: 202
-- Name: tb_contenant_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_contenant_id_seq OWNED BY ardoc.tb_contenant.id;


--
-- TOC entry 203 (class 1259 OID 54030)
-- Name: tb_destruction; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_destruction (
    id integer NOT NULL,
    idutilisateur integer,
    dateenregistrement character varying(255)
);


ALTER TABLE ardoc.tb_destruction OWNER TO postgres;

--
-- TOC entry 204 (class 1259 OID 54033)
-- Name: tb_destruction_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_destruction_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_destruction_id_seq OWNER TO postgres;

--
-- TOC entry 3462 (class 0 OID 0)
-- Dependencies: 204
-- Name: tb_destruction_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_destruction_id_seq OWNED BY ardoc.tb_destruction.id;


--
-- TOC entry 205 (class 1259 OID 54035)
-- Name: tb_inventaire; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_inventaire (
    id integer NOT NULL,
    idmagasin integer,
    idutilisateur integer,
    description text,
    datedebut date,
    dateinventaireprevu date,
    datevalidation character(255),
    observation text,
    idegenttraitant integer
);


ALTER TABLE ardoc.tb_inventaire OWNER TO postgres;

--
-- TOC entry 206 (class 1259 OID 54041)
-- Name: tb_inventaire_contenant; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_inventaire_contenant (
    id integer NOT NULL,
    idcontenant integer,
    idinventaire integer,
    estpresent integer DEFAULT '-1'::integer,
    observation text,
    cotation character varying(255)
);


ALTER TABLE ardoc.tb_inventaire_contenant OWNER TO postgres;

--
-- TOC entry 207 (class 1259 OID 54048)
-- Name: tb_inventaire_contenant_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_inventaire_contenant_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_inventaire_contenant_id_seq OWNER TO postgres;

--
-- TOC entry 3463 (class 0 OID 0)
-- Dependencies: 207
-- Name: tb_inventaire_contenant_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_inventaire_contenant_id_seq OWNED BY ardoc.tb_inventaire_contenant.id;


--
-- TOC entry 208 (class 1259 OID 54050)
-- Name: tb_inventaire_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_inventaire_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_inventaire_id_seq OWNER TO postgres;

--
-- TOC entry 3464 (class 0 OID 0)
-- Dependencies: 208
-- Name: tb_inventaire_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_inventaire_id_seq OWNED BY ardoc.tb_inventaire.id;


--
-- TOC entry 209 (class 1259 OID 54052)
-- Name: tb_inventaire_rayonnage; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_inventaire_rayonnage (
    id integer NOT NULL,
    idrayonnage integer,
    idinventaire integer
);


ALTER TABLE ardoc.tb_inventaire_rayonnage OWNER TO postgres;

--
-- TOC entry 210 (class 1259 OID 54055)
-- Name: tb_inventaire_rayonnage_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_inventaire_rayonnage_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_inventaire_rayonnage_id_seq OWNER TO postgres;

--
-- TOC entry 3465 (class 0 OID 0)
-- Dependencies: 210
-- Name: tb_inventaire_rayonnage_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_inventaire_rayonnage_id_seq OWNED BY ardoc.tb_inventaire_rayonnage.id;


--
-- TOC entry 211 (class 1259 OID 54057)
-- Name: tb_magasin; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_magasin (
    id integer NOT NULL,
    libelle character varying(255),
    superficie character(255),
    description text,
    idutilisateur integer,
    localisation character varying(255),
    typeacces character(1) DEFAULT 'g'::bpchar,
    listeacces text
);


ALTER TABLE ardoc.tb_magasin OWNER TO postgres;

--
-- TOC entry 3466 (class 0 OID 0)
-- Dependencies: 211
-- Name: COLUMN tb_magasin.idutilisateur; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_magasin.idutilisateur IS 'L''utilisateur ayant crée le magasin';


--
-- TOC entry 3467 (class 0 OID 0)
-- Dependencies: 211
-- Name: COLUMN tb_magasin.listeacces; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_magasin.listeacces IS 'Liste des id des utilisateurs ou entité ou de l''utilisateur(Cas personnel) ayant accès. Séparateur ,';


--
-- TOC entry 212 (class 1259 OID 54064)
-- Name: tb_magasin_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_magasin_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_magasin_id_seq OWNER TO postgres;

--
-- TOC entry 3468 (class 0 OID 0)
-- Dependencies: 212
-- Name: tb_magasin_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_magasin_id_seq OWNED BY ardoc.tb_magasin.id;


--
-- TOC entry 213 (class 1259 OID 54066)
-- Name: tb_meuble; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_meuble (
    id integer NOT NULL,
    code character varying(255),
    libelle character varying(255),
    localisation character varying(255),
    capacite numeric(10,3),
    description text,
    estactif integer DEFAULT 0,
    nbre_tablette integer,
    longueurtablette integer,
    idutilisateur integer,
    idtype integer,
    typeacces character(1) DEFAULT 'g'::bpchar,
    listeacces text,
    taille_totale numeric(10,3) DEFAULT 0.00
);


ALTER TABLE ardoc.tb_meuble OWNER TO postgres;

--
-- TOC entry 3469 (class 0 OID 0)
-- Dependencies: 213
-- Name: TABLE tb_meuble; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON TABLE ardoc.tb_meuble IS 'Liste des meubles';


--
-- TOC entry 3470 (class 0 OID 0)
-- Dependencies: 213
-- Name: COLUMN tb_meuble.id; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_meuble.id IS 'Indentifiant';


--
-- TOC entry 3471 (class 0 OID 0)
-- Dependencies: 213
-- Name: COLUMN tb_meuble.code; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_meuble.code IS 'Code du meuble';


--
-- TOC entry 3472 (class 0 OID 0)
-- Dependencies: 213
-- Name: COLUMN tb_meuble.libelle; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_meuble.libelle IS 'LIbellé du meuble';


--
-- TOC entry 3473 (class 0 OID 0)
-- Dependencies: 213
-- Name: COLUMN tb_meuble.localisation; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_meuble.localisation IS 'localisation du meuble';


--
-- TOC entry 3474 (class 0 OID 0)
-- Dependencies: 213
-- Name: COLUMN tb_meuble.capacite; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_meuble.capacite IS 'Capacité du meuble';


--
-- TOC entry 3475 (class 0 OID 0)
-- Dependencies: 213
-- Name: COLUMN tb_meuble.description; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_meuble.description IS 'Description du meuble';


--
-- TOC entry 3476 (class 0 OID 0)
-- Dependencies: 213
-- Name: COLUMN tb_meuble.estactif; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_meuble.estactif IS '0 est actif
1 est inactif';


--
-- TOC entry 3477 (class 0 OID 0)
-- Dependencies: 213
-- Name: COLUMN tb_meuble.nbre_tablette; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_meuble.nbre_tablette IS 'Nombre de tablette du meuble';


--
-- TOC entry 3478 (class 0 OID 0)
-- Dependencies: 213
-- Name: COLUMN tb_meuble.longueurtablette; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_meuble.longueurtablette IS 'Longueur de la tablette';


--
-- TOC entry 3479 (class 0 OID 0)
-- Dependencies: 213
-- Name: COLUMN tb_meuble.idutilisateur; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_meuble.idutilisateur IS 'Identifiant de l''utilisateur qui a crée le meuble';


--
-- TOC entry 3480 (class 0 OID 0)
-- Dependencies: 213
-- Name: COLUMN tb_meuble.idtype; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_meuble.idtype IS 'Identifiant du type de meuble';


--
-- TOC entry 3481 (class 0 OID 0)
-- Dependencies: 213
-- Name: COLUMN tb_meuble.listeacces; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_meuble.listeacces IS 'Liste des id des utilisateurs ou entité ou de l''utilisateur(Cas personnel) ayant accès. Séparateur ,';


--
-- TOC entry 214 (class 1259 OID 54075)
-- Name: tb_meuble_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_meuble_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_meuble_id_seq OWNER TO postgres;

--
-- TOC entry 3482 (class 0 OID 0)
-- Dependencies: 214
-- Name: tb_meuble_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_meuble_id_seq OWNED BY ardoc.tb_meuble.id;


--
-- TOC entry 215 (class 1259 OID 54077)
-- Name: tb_panier; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_panier (
    id integer NOT NULL,
    idarchive integer,
    idutilisateur integer,
    idcontenant integer
);


ALTER TABLE ardoc.tb_panier OWNER TO postgres;

--
-- TOC entry 3483 (class 0 OID 0)
-- Dependencies: 215
-- Name: TABLE tb_panier; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON TABLE ardoc.tb_panier IS 'Liste des archives contenues dans le panier utilisateur';


--
-- TOC entry 3484 (class 0 OID 0)
-- Dependencies: 215
-- Name: COLUMN tb_panier.idarchive; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_panier.idarchive IS 'Identifiant de l''archive';


--
-- TOC entry 3485 (class 0 OID 0)
-- Dependencies: 215
-- Name: COLUMN tb_panier.idutilisateur; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_panier.idutilisateur IS 'Identifiant de l''utilisateur';


--
-- TOC entry 216 (class 1259 OID 54080)
-- Name: tb_panier_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_panier_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_panier_id_seq OWNER TO postgres;

--
-- TOC entry 3486 (class 0 OID 0)
-- Dependencies: 216
-- Name: tb_panier_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_panier_id_seq OWNED BY ardoc.tb_panier.id;


--
-- TOC entry 217 (class 1259 OID 54082)
-- Name: tb_pret; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_pret (
    id integer NOT NULL,
    idutilisateur integer,
    objet character varying(255),
    moyen character varying(255),
    description text,
    idagenttraitant integer,
    datedemande character varying(255),
    datetraitement character varying(255),
    observation text,
    dateretour date,
    ddemande date,
    dtraitement date
);


ALTER TABLE ardoc.tb_pret OWNER TO postgres;

--
-- TOC entry 3487 (class 0 OID 0)
-- Dependencies: 217
-- Name: TABLE tb_pret; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON TABLE ardoc.tb_pret IS 'Liste des prêts effectués';


--
-- TOC entry 3488 (class 0 OID 0)
-- Dependencies: 217
-- Name: COLUMN tb_pret.id; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_pret.id IS 'Identifiant';


--
-- TOC entry 3489 (class 0 OID 0)
-- Dependencies: 217
-- Name: COLUMN tb_pret.objet; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_pret.objet IS 'Objet du prêt';


--
-- TOC entry 3490 (class 0 OID 0)
-- Dependencies: 217
-- Name: COLUMN tb_pret.moyen; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_pret.moyen IS 'Moyen de communication';


--
-- TOC entry 3491 (class 0 OID 0)
-- Dependencies: 217
-- Name: COLUMN tb_pret.idagenttraitant; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_pret.idagenttraitant IS 'Identifiant de celui qui a traité le prêt';


--
-- TOC entry 3492 (class 0 OID 0)
-- Dependencies: 217
-- Name: COLUMN tb_pret.datedemande; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_pret.datedemande IS 'Heure de soumission du prêt';


--
-- TOC entry 3493 (class 0 OID 0)
-- Dependencies: 217
-- Name: COLUMN tb_pret.datetraitement; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_pret.datetraitement IS 'Heure de traitement du prêt';


--
-- TOC entry 3494 (class 0 OID 0)
-- Dependencies: 217
-- Name: COLUMN tb_pret.observation; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_pret.observation IS 'Observation du traitant ';


--
-- TOC entry 3495 (class 0 OID 0)
-- Dependencies: 217
-- Name: COLUMN tb_pret.dateretour; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_pret.dateretour IS 'Date de retour des archives';


--
-- TOC entry 218 (class 1259 OID 54088)
-- Name: tb_pret_archive; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_pret_archive (
    id integer NOT NULL,
    idarchive integer,
    idpret integer,
    estaccorde integer DEFAULT 0,
    estretourne integer DEFAULT 0,
    idretour integer
);


ALTER TABLE ardoc.tb_pret_archive OWNER TO postgres;

--
-- TOC entry 3496 (class 0 OID 0)
-- Dependencies: 218
-- Name: TABLE tb_pret_archive; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON TABLE ardoc.tb_pret_archive IS 'Liste des archives prêtées';


--
-- TOC entry 3497 (class 0 OID 0)
-- Dependencies: 218
-- Name: COLUMN tb_pret_archive.estaccorde; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_pret_archive.estaccorde IS '0 si n''est pas accordé
1 si est accordé';


--
-- TOC entry 3498 (class 0 OID 0)
-- Dependencies: 218
-- Name: COLUMN tb_pret_archive.estretourne; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_pret_archive.estretourne IS '1 si est retourné,
0 sinon';


--
-- TOC entry 219 (class 1259 OID 54093)
-- Name: tb_pret_archive_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_pret_archive_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_pret_archive_id_seq OWNER TO postgres;

--
-- TOC entry 3499 (class 0 OID 0)
-- Dependencies: 219
-- Name: tb_pret_archive_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_pret_archive_id_seq OWNED BY ardoc.tb_pret_archive.id;


--
-- TOC entry 220 (class 1259 OID 54095)
-- Name: tb_pret_contenant; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_pret_contenant (
    id integer NOT NULL,
    idcontenant integer,
    idpret integer,
    estaccorde integer DEFAULT 0,
    estretourne integer DEFAULT 0,
    idretour integer
);


ALTER TABLE ardoc.tb_pret_contenant OWNER TO postgres;

--
-- TOC entry 3500 (class 0 OID 0)
-- Dependencies: 220
-- Name: TABLE tb_pret_contenant; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON TABLE ardoc.tb_pret_contenant IS 'Liste des contenants prêtés';


--
-- TOC entry 3501 (class 0 OID 0)
-- Dependencies: 220
-- Name: COLUMN tb_pret_contenant.estaccorde; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_pret_contenant.estaccorde IS '0 si n''est pas accordé
1 si est accordé';


--
-- TOC entry 3502 (class 0 OID 0)
-- Dependencies: 220
-- Name: COLUMN tb_pret_contenant.estretourne; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_pret_contenant.estretourne IS '1 si est retourné,
0 sinon';


--
-- TOC entry 221 (class 1259 OID 54100)
-- Name: tb_pret_contenant_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_pret_contenant_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_pret_contenant_id_seq OWNER TO postgres;

--
-- TOC entry 3503 (class 0 OID 0)
-- Dependencies: 221
-- Name: tb_pret_contenant_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_pret_contenant_id_seq OWNED BY ardoc.tb_pret_contenant.id;


--
-- TOC entry 222 (class 1259 OID 54102)
-- Name: tb_pret_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_pret_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_pret_id_seq OWNER TO postgres;

--
-- TOC entry 3504 (class 0 OID 0)
-- Dependencies: 222
-- Name: tb_pret_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_pret_id_seq OWNED BY ardoc.tb_pret.id;


--
-- TOC entry 223 (class 1259 OID 54104)
-- Name: tb_rayonnage; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_rayonnage (
    id integer NOT NULL,
    code character varying(255),
    libelle character varying(255),
    nbre_tablette integer,
    statut character varying(255),
    idmagasin integer,
    description text,
    capacite numeric(10,3),
    estactif integer DEFAULT 1,
    idtype integer,
    taille_totale numeric(10,3) DEFAULT 0
);


ALTER TABLE ardoc.tb_rayonnage OWNER TO postgres;

--
-- TOC entry 3505 (class 0 OID 0)
-- Dependencies: 223
-- Name: COLUMN tb_rayonnage.estactif; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_rayonnage.estactif IS '1 si inactif
0 si actif';


--
-- TOC entry 224 (class 1259 OID 54112)
-- Name: tb_rayonnage_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_rayonnage_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_rayonnage_id_seq OWNER TO postgres;

--
-- TOC entry 3506 (class 0 OID 0)
-- Dependencies: 224
-- Name: tb_rayonnage_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_rayonnage_id_seq OWNED BY ardoc.tb_rayonnage.id;


--
-- TOC entry 225 (class 1259 OID 54114)
-- Name: tb_retour; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_retour (
    id integer NOT NULL,
    idutilisateur integer,
    description text,
    idagenttraitant integer,
    observation text,
    datedemande character varying(255),
    datetraitement character varying(255),
    dateretour date,
    ddemande date,
    dtraitement date
);


ALTER TABLE ardoc.tb_retour OWNER TO postgres;

--
-- TOC entry 226 (class 1259 OID 54120)
-- Name: tb_retour_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_retour_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_retour_id_seq OWNER TO postgres;

--
-- TOC entry 3507 (class 0 OID 0)
-- Dependencies: 226
-- Name: tb_retour_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_retour_id_seq OWNED BY ardoc.tb_retour.id;


--
-- TOC entry 227 (class 1259 OID 54122)
-- Name: tb_transfert; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_transfert (
    id integer NOT NULL,
    datetransfertprevu date,
    idtiers integer,
    type character varying(255),
    description text,
    datevalidation character varying(255),
    idutilisateur integer,
    datedebut date
);


ALTER TABLE ardoc.tb_transfert OWNER TO postgres;

--
-- TOC entry 3508 (class 0 OID 0)
-- Dependencies: 227
-- Name: COLUMN tb_transfert.idtiers; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_transfert.idtiers IS 'Identfiant du tiers archiveur';


--
-- TOC entry 3509 (class 0 OID 0)
-- Dependencies: 227
-- Name: COLUMN tb_transfert.type; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_transfert.type IS 'Type de transfert';


--
-- TOC entry 3510 (class 0 OID 0)
-- Dependencies: 227
-- Name: COLUMN tb_transfert.description; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_transfert.description IS 'Description du transfert';


--
-- TOC entry 3511 (class 0 OID 0)
-- Dependencies: 227
-- Name: COLUMN tb_transfert.datevalidation; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_transfert.datevalidation IS 'Heure de validation du transfert';


--
-- TOC entry 3512 (class 0 OID 0)
-- Dependencies: 227
-- Name: COLUMN tb_transfert.idutilisateur; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_transfert.idutilisateur IS 'Identifiant de l''utilisateur qui a crée le transfert';


--
-- TOC entry 228 (class 1259 OID 54128)
-- Name: tb_transfert_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_transfert_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_transfert_id_seq OWNER TO postgres;

--
-- TOC entry 3513 (class 0 OID 0)
-- Dependencies: 228
-- Name: tb_transfert_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_transfert_id_seq OWNED BY ardoc.tb_transfert.id;


--
-- TOC entry 229 (class 1259 OID 54130)
-- Name: tb_type_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_type_id_seq OWNER TO postgres;

--
-- TOC entry 230 (class 1259 OID 54132)
-- Name: tb_type; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_type (
    id integer DEFAULT nextval('ardoc.tb_type_id_seq'::regclass) NOT NULL,
    libelle character varying(255),
    nbre_tablette integer,
    capacite numeric(10,3),
    description text,
    niveau integer DEFAULT 0
);


ALTER TABLE ardoc.tb_type OWNER TO postgres;

--
-- TOC entry 3514 (class 0 OID 0)
-- Dependencies: 230
-- Name: TABLE tb_type; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON TABLE ardoc.tb_type IS 'Liste des types de meubles';


--
-- TOC entry 3515 (class 0 OID 0)
-- Dependencies: 230
-- Name: COLUMN tb_type.id; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_type.id IS 'Identifiant';


--
-- TOC entry 3516 (class 0 OID 0)
-- Dependencies: 230
-- Name: COLUMN tb_type.niveau; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_type.niveau IS '1 si contenant
2 si meuble
3 si rayonnage';


--
-- TOC entry 231 (class 1259 OID 54140)
-- Name: tb_unite; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_unite (
    id integer NOT NULL,
    description character varying(255),
    libelle character varying(255),
    valeur1 numeric(10,3),
    estpublie integer DEFAULT 0,
    valeur2 numeric(10,3)
);


ALTER TABLE ardoc.tb_unite OWNER TO postgres;

--
-- TOC entry 3517 (class 0 OID 0)
-- Dependencies: 231
-- Name: COLUMN tb_unite.id; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_unite.id IS 'Identifiant';


--
-- TOC entry 3518 (class 0 OID 0)
-- Dependencies: 231
-- Name: COLUMN tb_unite.description; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_unite.description IS 'Description de l''unité';


--
-- TOC entry 3519 (class 0 OID 0)
-- Dependencies: 231
-- Name: COLUMN tb_unite.libelle; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_unite.libelle IS 'Libellé de l''unité';


--
-- TOC entry 3520 (class 0 OID 0)
-- Dependencies: 231
-- Name: COLUMN tb_unite.estpublie; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_unite.estpublie IS '0 si non publié et 1 si oublié';


--
-- TOC entry 232 (class 1259 OID 54147)
-- Name: tb_unite_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_unite_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_unite_id_seq OWNER TO postgres;

--
-- TOC entry 3521 (class 0 OID 0)
-- Dependencies: 232
-- Name: tb_unite_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_unite_id_seq OWNED BY ardoc.tb_unite.id;


--
-- TOC entry 233 (class 1259 OID 54149)
-- Name: tb_versement; Type: TABLE; Schema: ardoc; Owner: postgres
--

CREATE TABLE ardoc.tb_versement (
    id integer NOT NULL,
    datedebut date,
    dateversement character varying(255),
    idagentversant integer,
    idagenttraitant integer,
    description text,
    etat integer,
    dateversementprevu date,
    datetraitement character varying(255),
    observation text,
    dversement date,
    dtraitement date
);


ALTER TABLE ardoc.tb_versement OWNER TO postgres;

--
-- TOC entry 3522 (class 0 OID 0)
-- Dependencies: 233
-- Name: TABLE tb_versement; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON TABLE ardoc.tb_versement IS 'Liste des versements des contenants';


--
-- TOC entry 3523 (class 0 OID 0)
-- Dependencies: 233
-- Name: COLUMN tb_versement.id; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_versement.id IS 'Identifiant';


--
-- TOC entry 3524 (class 0 OID 0)
-- Dependencies: 233
-- Name: COLUMN tb_versement.dateversement; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_versement.dateversement IS 'Heure de versement';


--
-- TOC entry 3525 (class 0 OID 0)
-- Dependencies: 233
-- Name: COLUMN tb_versement.idagentversant; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_versement.idagentversant IS 'Identifiant de l''argent ayant effectué le versement';


--
-- TOC entry 3526 (class 0 OID 0)
-- Dependencies: 233
-- Name: COLUMN tb_versement.idagenttraitant; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_versement.idagenttraitant IS 'Identifiant de l''agent ayant traité le versement';


--
-- TOC entry 3527 (class 0 OID 0)
-- Dependencies: 233
-- Name: COLUMN tb_versement.etat; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_versement.etat IS '0 valeur par défaut
1 si le versement est validé
2 si le versement est traité';


--
-- TOC entry 3528 (class 0 OID 0)
-- Dependencies: 233
-- Name: COLUMN tb_versement.dateversementprevu; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_versement.dateversementprevu IS 'Date de versement prévu';


--
-- TOC entry 3529 (class 0 OID 0)
-- Dependencies: 233
-- Name: COLUMN tb_versement.datetraitement; Type: COMMENT; Schema: ardoc; Owner: postgres
--

COMMENT ON COLUMN ardoc.tb_versement.datetraitement IS 'Heure de traitement';


--
-- TOC entry 234 (class 1259 OID 54155)
-- Name: tb_versement_id_seq; Type: SEQUENCE; Schema: ardoc; Owner: postgres
--

CREATE SEQUENCE ardoc.tb_versement_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE ardoc.tb_versement_id_seq OWNER TO postgres;

--
-- TOC entry 3530 (class 0 OID 0)
-- Dependencies: 234
-- Name: tb_versement_id_seq; Type: SEQUENCE OWNED BY; Schema: ardoc; Owner: postgres
--

ALTER SEQUENCE ardoc.tb_versement_id_seq OWNED BY ardoc.tb_versement.id;


--
-- TOC entry 235 (class 1259 OID 54157)
-- Name: tb_affaire; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_affaire (
    id integer NOT NULL,
    code character varying(255),
    libelle character varying(255),
    description text,
    estactif integer DEFAULT 1,
    typeacces character varying(1) DEFAULT 'g'::character varying,
    listeacces text
);


ALTER TABLE public.tb_affaire OWNER TO postgres;

--
-- TOC entry 3531 (class 0 OID 0)
-- Dependencies: 235
-- Name: TABLE tb_affaire; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_affaire IS 'Liste des affaires';


--
-- TOC entry 3532 (class 0 OID 0)
-- Dependencies: 235
-- Name: COLUMN tb_affaire.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_affaire.id IS 'Identifiant';


--
-- TOC entry 3533 (class 0 OID 0)
-- Dependencies: 235
-- Name: COLUMN tb_affaire.code; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_affaire.code IS 'Code de l''affaire';


--
-- TOC entry 3534 (class 0 OID 0)
-- Dependencies: 235
-- Name: COLUMN tb_affaire.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_affaire.libelle IS 'Libellé de l''affaire';


--
-- TOC entry 3535 (class 0 OID 0)
-- Dependencies: 235
-- Name: COLUMN tb_affaire.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_affaire.description IS 'Description de l''affaire';


--
-- TOC entry 3536 (class 0 OID 0)
-- Dependencies: 235
-- Name: COLUMN tb_affaire.estactif; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_affaire.estactif IS '1 si actif et 0 sinon';


--
-- TOC entry 236 (class 1259 OID 54165)
-- Name: tb_affaire_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_affaire_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_affaire_id_seq OWNER TO postgres;

--
-- TOC entry 3537 (class 0 OID 0)
-- Dependencies: 236
-- Name: tb_affaire_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_affaire_id_seq OWNED BY public.tb_affaire.id;


--
-- TOC entry 237 (class 1259 OID 54167)
-- Name: tb_application; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_application (
    id integer NOT NULL,
    libelle character varying(255),
    description text
);


ALTER TABLE public.tb_application OWNER TO postgres;

--
-- TOC entry 3538 (class 0 OID 0)
-- Dependencies: 237
-- Name: TABLE tb_application; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_application IS 'Liste des applications accessibles';


--
-- TOC entry 3539 (class 0 OID 0)
-- Dependencies: 237
-- Name: COLUMN tb_application.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_application.id IS 'Identifiant';


--
-- TOC entry 3540 (class 0 OID 0)
-- Dependencies: 237
-- Name: COLUMN tb_application.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_application.libelle IS 'Libellé de l''application';


--
-- TOC entry 3541 (class 0 OID 0)
-- Dependencies: 237
-- Name: COLUMN tb_application.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_application.description IS 'Description';


--
-- TOC entry 238 (class 1259 OID 54173)
-- Name: tb_application_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_application_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_application_id_seq OWNER TO postgres;

--
-- TOC entry 3542 (class 0 OID 0)
-- Dependencies: 238
-- Name: tb_application_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_application_id_seq OWNED BY public.tb_application.id;


--
-- TOC entry 239 (class 1259 OID 54175)
-- Name: tb_backup; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_backup (
    id integer NOT NULL,
    date date,
    description text,
    idutilisateur integer,
    type character varying(255),
    dateheure character varying(255),
    filename character varying(255)
);


ALTER TABLE public.tb_backup OWNER TO postgres;

--
-- TOC entry 3543 (class 0 OID 0)
-- Dependencies: 239
-- Name: TABLE tb_backup; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_backup IS 'Liste des backup effectués dans RemaBox';


--
-- TOC entry 3544 (class 0 OID 0)
-- Dependencies: 239
-- Name: COLUMN tb_backup.type; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_backup.type IS 'Type de backup, Manuelle ou automatique';


--
-- TOC entry 3545 (class 0 OID 0)
-- Dependencies: 239
-- Name: COLUMN tb_backup.filename; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_backup.filename IS 'Nom du fichier de données';


--
-- TOC entry 240 (class 1259 OID 54181)
-- Name: tb_backup_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_backup_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_backup_id_seq OWNER TO postgres;

--
-- TOC entry 3546 (class 0 OID 0)
-- Dependencies: 240
-- Name: tb_backup_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_backup_id_seq OWNED BY public.tb_backup.id;


--
-- TOC entry 241 (class 1259 OID 54183)
-- Name: tb_classement; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_classement (
    id integer NOT NULL,
    code character varying(255),
    libelle character varying(255),
    description text,
    idparent integer,
    estpublie integer DEFAULT 0,
    idclassement integer,
    depth integer DEFAULT 0,
    idlistediffusion integer,
    idmodeletraitement integer,
    identite integer,
    idmodeleindexation integer,
    idconservation integer,
    idsecurite integer,
    hasdossier integer DEFAULT 0,
    hasserie integer DEFAULT 0
);


ALTER TABLE public.tb_classement OWNER TO postgres;

--
-- TOC entry 3547 (class 0 OID 0)
-- Dependencies: 241
-- Name: TABLE tb_classement; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_classement IS 'Liste des series du plan de classement';


--
-- TOC entry 3548 (class 0 OID 0)
-- Dependencies: 241
-- Name: COLUMN tb_classement.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_classement.id IS 'Indentifiant';


--
-- TOC entry 3549 (class 0 OID 0)
-- Dependencies: 241
-- Name: COLUMN tb_classement.code; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_classement.code IS 'Code du plan de classement';


--
-- TOC entry 3550 (class 0 OID 0)
-- Dependencies: 241
-- Name: COLUMN tb_classement.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_classement.libelle IS 'Libellé';


--
-- TOC entry 3551 (class 0 OID 0)
-- Dependencies: 241
-- Name: COLUMN tb_classement.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_classement.description IS 'Description';


--
-- TOC entry 3552 (class 0 OID 0)
-- Dependencies: 241
-- Name: COLUMN tb_classement.idparent; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_classement.idparent IS 'identifiant du plan';


--
-- TOC entry 3553 (class 0 OID 0)
-- Dependencies: 241
-- Name: COLUMN tb_classement.idlistediffusion; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_classement.idlistediffusion IS 'Identifiant de la liste de diffusion';


--
-- TOC entry 3554 (class 0 OID 0)
-- Dependencies: 241
-- Name: COLUMN tb_classement.idmodeletraitement; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_classement.idmodeletraitement IS 'Identifiant du modèle de traitement';


--
-- TOC entry 3555 (class 0 OID 0)
-- Dependencies: 241
-- Name: COLUMN tb_classement.identite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_classement.identite IS 'Identifiant de l''entité dans l''arborescence des entités ou services';


--
-- TOC entry 3556 (class 0 OID 0)
-- Dependencies: 241
-- Name: COLUMN tb_classement.idsecurite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_classement.idsecurite IS 'Identifiant du niveau de sécurité';


--
-- TOC entry 242 (class 1259 OID 54193)
-- Name: tb_classement_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_classement_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_classement_id_seq OWNER TO postgres;

--
-- TOC entry 3557 (class 0 OID 0)
-- Dependencies: 242
-- Name: tb_classement_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_classement_id_seq OWNED BY public.tb_classement.id;


--
-- TOC entry 243 (class 1259 OID 54195)
-- Name: tb_code; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_code (
    id integer NOT NULL,
    entite character varying(255),
    longueur integer,
    chainegauche character varying(255),
    chainedroite character varying(255),
    numerocours integer DEFAULT 1,
    libelle character varying(255)
);


ALTER TABLE public.tb_code OWNER TO postgres;

--
-- TOC entry 3558 (class 0 OID 0)
-- Dependencies: 243
-- Name: TABLE tb_code; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_code IS 'Liste des codes des entités';


--
-- TOC entry 3559 (class 0 OID 0)
-- Dependencies: 243
-- Name: COLUMN tb_code.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_code.id IS 'Identifiant';


--
-- TOC entry 244 (class 1259 OID 54202)
-- Name: tb_code_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_code_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_code_id_seq OWNER TO postgres;

--
-- TOC entry 3560 (class 0 OID 0)
-- Dependencies: 244
-- Name: tb_code_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_code_id_seq OWNED BY public.tb_code.id;


--
-- TOC entry 245 (class 1259 OID 54204)
-- Name: tb_colonne; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_colonne (
    id integer NOT NULL,
    libelle character varying(255),
    nom character varying(255),
    entite text,
    size numeric(5,2),
    align character varying(255) DEFAULT 'left'::character varying,
    import_only smallint DEFAULT 0,
    table_referenced character varying(255),
    column_referenced character varying(255),
    description text
);


ALTER TABLE public.tb_colonne OWNER TO postgres;

--
-- TOC entry 3561 (class 0 OID 0)
-- Dependencies: 245
-- Name: TABLE tb_colonne; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_colonne IS 'Liste des colonnes à afficher dans le GRID';


--
-- TOC entry 3562 (class 0 OID 0)
-- Dependencies: 245
-- Name: COLUMN tb_colonne.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_colonne.libelle IS 'Nom à afficher dans la colonne du GRID';


--
-- TOC entry 3563 (class 0 OID 0)
-- Dependencies: 245
-- Name: COLUMN tb_colonne.nom; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_colonne.nom IS 'Nom de la colonne dans le tableau';


--
-- TOC entry 3564 (class 0 OID 0)
-- Dependencies: 245
-- Name: COLUMN tb_colonne.entite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_colonne.entite IS 'Liste des tables concernées par le nom de la colonne';


--
-- TOC entry 3565 (class 0 OID 0)
-- Dependencies: 245
-- Name: COLUMN tb_colonne.align; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_colonne.align IS 'left';


--
-- TOC entry 246 (class 1259 OID 54212)
-- Name: tb_colonne_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_colonne_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_colonne_id_seq OWNER TO postgres;

--
-- TOC entry 3566 (class 0 OID 0)
-- Dependencies: 246
-- Name: tb_colonne_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_colonne_id_seq OWNED BY public.tb_colonne.id;


--
-- TOC entry 247 (class 1259 OID 54214)
-- Name: tb_configuration; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_configuration (
    id integer NOT NULL,
    chainegaucheaffaire character varying(255),
    longueuraffaire integer,
    chainedroiteaffaire character varying(255),
    chainegauchechronogramme character varying(255),
    longueurchronogramme integer,
    chainedroitechronogramme character varying(255),
    chainegauchemodeletraitement character varying(255),
    longueurmodeletraitement integer,
    chainedroitemodeletraitement character varying(255),
    chainegauchelistediffusion character varying(255),
    longueurlistediffusion integer,
    chainedroitelistediffusion character varying(255),
    chainegaucheplanclassement character varying(255),
    longueurplanclassement integer,
    chainedroiteplanclassement character varying(255),
    chainegauchedossierpersonnel character varying(255),
    longueurdossierpersonnel integer,
    chainedroitedossierpersonnel character varying(255),
    chainegaucheentite character varying(255),
    longueurentite integer,
    chainedroiteentite character varying(255),
    durretraitementcourrierarrive integer,
    durretraitementcourrierinterne integer,
    intervallerechargementbannette integer,
    numeroaffaire integer DEFAULT 1,
    numerochronogramme integer DEFAULT 1,
    numeromodeletraitement integer DEFAULT 1,
    numerolistediffusion integer DEFAULT 1,
    numeroplanclassement integer DEFAULT 1,
    numerodossierpersonnel integer DEFAULT 1,
    numeroentite integer DEFAULT 1,
    nombredonnesparpage integer,
    chainegauchesecurite character varying(255),
    longueursecurite character varying(255),
    chainedroitesecurite character varying(255),
    numerosecurite integer,
    chainegauchelisteautorite character varying(255),
    longueurlisteautorite integer,
    chainedroitelisteautorite character varying(255),
    numerolisteautorite integer,
    chainegaucheconservation character varying(255),
    longueurconservation integer,
    chainedroiteconservation character varying(255),
    numeroconservation integer,
    chainegauchemodeleindexation character varying(255),
    longueurmodeleindexation integer,
    chainedroitemodeleindexation character varying(255),
    numeromodeleindexation integer,
    dureesession integer,
    numeromeuble integer,
    chainegauchemeuble character varying(255),
    chainedroitemeuble character varying(255),
    longueurmeuble integer,
    numerocontenant integer,
    chainegauchecontenant character varying(255),
    longueurcontenant integer,
    chainedroitecontenant character varying(255),
    idunite integer,
    longueurarchive integer,
    chainedroitearchive character varying(255),
    chainegauchearchive character varying(255),
    numeroarchive integer,
    numerorayonnage integer,
    chainegaucherayonnage character varying(255),
    chainedroiterayonnage character varying(255),
    longueurrayonnage integer,
    valeurml real,
    valeurm3 real,
    dua integer,
    duc integer,
    sof character varying(255)
);


ALTER TABLE public.tb_configuration OWNER TO postgres;

--
-- TOC entry 3567 (class 0 OID 0)
-- Dependencies: 247
-- Name: TABLE tb_configuration; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_configuration IS 'Liste des configuration de Melbox';


--
-- TOC entry 3568 (class 0 OID 0)
-- Dependencies: 247
-- Name: COLUMN tb_configuration.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_configuration.id IS 'Identifiant de la configuration';


--
-- TOC entry 3569 (class 0 OID 0)
-- Dependencies: 247
-- Name: COLUMN tb_configuration.idunite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_configuration.idunite IS 'Identifiant de l''unité utilisé dans la plateforme';


--
-- TOC entry 248 (class 1259 OID 54227)
-- Name: tb_configuration_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_configuration_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_configuration_id_seq OWNER TO postgres;

--
-- TOC entry 3570 (class 0 OID 0)
-- Dependencies: 248
-- Name: tb_configuration_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_configuration_id_seq OWNED BY public.tb_configuration.id;


--
-- TOC entry 249 (class 1259 OID 54229)
-- Name: tb_connexion; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_connexion (
    id integer NOT NULL,
    idengine integer,
    host character varying(255),
    dbname character varying(255),
    username character varying(255),
    password character varying(255),
    port character varying(255),
    description text,
    libelle character varying(255),
    idencode character varying(255)
);


ALTER TABLE public.tb_connexion OWNER TO postgres;

--
-- TOC entry 3571 (class 0 OID 0)
-- Dependencies: 249
-- Name: TABLE tb_connexion; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_connexion IS 'Liste des connexions aux bases de données externes';


--
-- TOC entry 250 (class 1259 OID 54235)
-- Name: tb_connexion_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_connexion_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_connexion_id_seq OWNER TO postgres;

--
-- TOC entry 3572 (class 0 OID 0)
-- Dependencies: 250
-- Name: tb_connexion_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_connexion_id_seq OWNED BY public.tb_connexion.id;


--
-- TOC entry 251 (class 1259 OID 54237)
-- Name: tb_conservation; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_conservation (
    id integer NOT NULL,
    code character varying(255),
    libelle character varying(255),
    dua integer,
    sof character varying(255),
    description text,
    estactif integer DEFAULT 1,
    estdefinitif integer DEFAULT 0,
    duc integer
);


ALTER TABLE public.tb_conservation OWNER TO postgres;

--
-- TOC entry 3573 (class 0 OID 0)
-- Dependencies: 251
-- Name: COLUMN tb_conservation.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_conservation.id IS 'Identifiant';


--
-- TOC entry 3574 (class 0 OID 0)
-- Dependencies: 251
-- Name: COLUMN tb_conservation.code; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_conservation.code IS 'Code';


--
-- TOC entry 3575 (class 0 OID 0)
-- Dependencies: 251
-- Name: COLUMN tb_conservation.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_conservation.libelle IS 'LIbellé';


--
-- TOC entry 3576 (class 0 OID 0)
-- Dependencies: 251
-- Name: COLUMN tb_conservation.dua; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_conservation.dua IS 'DUA en mois';


--
-- TOC entry 3577 (class 0 OID 0)
-- Dependencies: 251
-- Name: COLUMN tb_conservation.sof; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_conservation.sof IS 'Sort final';


--
-- TOC entry 3578 (class 0 OID 0)
-- Dependencies: 251
-- Name: COLUMN tb_conservation.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_conservation.description IS 'Description';


--
-- TOC entry 3579 (class 0 OID 0)
-- Dependencies: 251
-- Name: COLUMN tb_conservation.estactif; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_conservation.estactif IS '1 si est actif, 0 sinon 
Par défaut 1';


--
-- TOC entry 3580 (class 0 OID 0)
-- Dependencies: 251
-- Name: COLUMN tb_conservation.estdefinitif; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_conservation.estdefinitif IS '1 si est définitif, 0 sinon
Par défaut 0';


--
-- TOC entry 252 (class 1259 OID 54245)
-- Name: tb_conservation_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_conservation_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_conservation_id_seq OWNER TO postgres;

--
-- TOC entry 3581 (class 0 OID 0)
-- Dependencies: 252
-- Name: tb_conservation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_conservation_id_seq OWNED BY public.tb_conservation.id;


--
-- TOC entry 253 (class 1259 OID 54247)
-- Name: tb_document; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_document (
    id integer NOT NULL,
    nom character varying(255),
    lien character varying(255),
    idutilisateur integer,
    size character varying(255),
    estindexer integer DEFAULT 0,
    dateajout character varying(255),
    fulltext text,
    ts_search tsvector,
    t_index text,
    hash text
);


ALTER TABLE public.tb_document OWNER TO postgres;

--
-- TOC entry 3582 (class 0 OID 0)
-- Dependencies: 253
-- Name: TABLE tb_document; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_document IS 'Liste des documents manipulés dans ReMaBOX';


--
-- TOC entry 3583 (class 0 OID 0)
-- Dependencies: 253
-- Name: COLUMN tb_document.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_document.id IS 'Identifiant';


--
-- TOC entry 3584 (class 0 OID 0)
-- Dependencies: 253
-- Name: COLUMN tb_document.nom; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_document.nom IS 'Nom original du fichier';


--
-- TOC entry 3585 (class 0 OID 0)
-- Dependencies: 253
-- Name: COLUMN tb_document.lien; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_document.lien IS 'chemin d''accès du fichier';


--
-- TOC entry 3586 (class 0 OID 0)
-- Dependencies: 253
-- Name: COLUMN tb_document.idutilisateur; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_document.idutilisateur IS 'Identifiant du fichier';


--
-- TOC entry 3587 (class 0 OID 0)
-- Dependencies: 253
-- Name: COLUMN tb_document.size; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_document.size IS 'Taille du fichier';


--
-- TOC entry 3588 (class 0 OID 0)
-- Dependencies: 253
-- Name: COLUMN tb_document.estindexer; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_document.estindexer IS '1 si oui 
0 sinon';


--
-- TOC entry 254 (class 1259 OID 54254)
-- Name: tb_document_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_document_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_document_id_seq OWNER TO postgres;

--
-- TOC entry 3589 (class 0 OID 0)
-- Dependencies: 254
-- Name: tb_document_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_document_id_seq OWNED BY public.tb_document.id;


--
-- TOC entry 255 (class 1259 OID 54256)
-- Name: tb_dossier; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_dossier (
    id integer NOT NULL,
    libelle character varying(255),
    description text,
    code character varying(255),
    idparent integer DEFAULT '-1'::integer,
    idsecurite integer,
    completude text,
    idclassement integer,
    idrepertoire integer,
    depth integer DEFAULT 0,
    hasdossier integer DEFAULT 0
);


ALTER TABLE public.tb_dossier OWNER TO postgres;

--
-- TOC entry 3590 (class 0 OID 0)
-- Dependencies: 255
-- Name: TABLE tb_dossier; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_dossier IS 'Liste des dossiers personnels utilisateur';


--
-- TOC entry 3591 (class 0 OID 0)
-- Dependencies: 255
-- Name: COLUMN tb_dossier.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_dossier.id IS 'Identifiant de l''utilisateur';


--
-- TOC entry 3592 (class 0 OID 0)
-- Dependencies: 255
-- Name: COLUMN tb_dossier.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_dossier.libelle IS 'Libellé du dossier';


--
-- TOC entry 3593 (class 0 OID 0)
-- Dependencies: 255
-- Name: COLUMN tb_dossier.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_dossier.description IS 'Description du dossier';


--
-- TOC entry 3594 (class 0 OID 0)
-- Dependencies: 255
-- Name: COLUMN tb_dossier.code; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_dossier.code IS 'Code du dossier';


--
-- TOC entry 3595 (class 0 OID 0)
-- Dependencies: 255
-- Name: COLUMN tb_dossier.idparent; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_dossier.idparent IS 'Identifiant du parent';


--
-- TOC entry 3596 (class 0 OID 0)
-- Dependencies: 255
-- Name: COLUMN tb_dossier.idsecurite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_dossier.idsecurite IS 'Identifiant du niveau de sécurité';


--
-- TOC entry 256 (class 1259 OID 54265)
-- Name: tb_dossier_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_dossier_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_dossier_id_seq OWNER TO postgres;

--
-- TOC entry 3597 (class 0 OID 0)
-- Dependencies: 256
-- Name: tb_dossier_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_dossier_id_seq OWNED BY public.tb_dossier.id;


--
-- TOC entry 257 (class 1259 OID 54267)
-- Name: tb_droit; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_droit (
    id integer NOT NULL,
    libelle character varying(255),
    description text,
    estclassique integer,
    application character varying(255)
);


ALTER TABLE public.tb_droit OWNER TO postgres;

--
-- TOC entry 3598 (class 0 OID 0)
-- Dependencies: 257
-- Name: TABLE tb_droit; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_droit IS 'Liste des droits de RemaBOX';


--
-- TOC entry 3599 (class 0 OID 0)
-- Dependencies: 257
-- Name: COLUMN tb_droit.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_droit.id IS 'Identifiant';


--
-- TOC entry 3600 (class 0 OID 0)
-- Dependencies: 257
-- Name: COLUMN tb_droit.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_droit.libelle IS 'Libellé du droit';


--
-- TOC entry 3601 (class 0 OID 0)
-- Dependencies: 257
-- Name: COLUMN tb_droit.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_droit.description IS 'Description sur le droit';


--
-- TOC entry 3602 (class 0 OID 0)
-- Dependencies: 257
-- Name: COLUMN tb_droit.estclassique; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_droit.estclassique IS '1 si le droit est classique
0 s''il s''agit d''un droit avancé';


--
-- TOC entry 3603 (class 0 OID 0)
-- Dependencies: 257
-- Name: COLUMN tb_droit.application; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_droit.application IS 'Application auquelle appartient le droit';


--
-- TOC entry 258 (class 1259 OID 54273)
-- Name: tb_droit_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_droit_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_droit_id_seq OWNER TO postgres;

--
-- TOC entry 3604 (class 0 OID 0)
-- Dependencies: 258
-- Name: tb_droit_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_droit_id_seq OWNED BY public.tb_droit.id;


--
-- TOC entry 259 (class 1259 OID 54275)
-- Name: tb_encode; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_encode (
    id character varying(255) NOT NULL,
    libelle character varying(255)
);


ALTER TABLE public.tb_encode OWNER TO postgres;

--
-- TOC entry 260 (class 1259 OID 54281)
-- Name: tb_engine; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_engine (
    id integer NOT NULL,
    libelle character varying(255)
);


ALTER TABLE public.tb_engine OWNER TO postgres;

--
-- TOC entry 3605 (class 0 OID 0)
-- Dependencies: 260
-- Name: TABLE tb_engine; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_engine IS 'Liste des moteurs de bases de données';


--
-- TOC entry 261 (class 1259 OID 54284)
-- Name: tb_engine_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_engine_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_engine_id_seq OWNER TO postgres;

--
-- TOC entry 3606 (class 0 OID 0)
-- Dependencies: 261
-- Name: tb_engine_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_engine_id_seq OWNED BY public.tb_engine.id;


--
-- TOC entry 262 (class 1259 OID 54286)
-- Name: tb_entite; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_entite (
    id integer NOT NULL,
    code character varying(255),
    libelle character varying(255),
    description text,
    idparent integer,
    estpublie integer DEFAULT 0,
    identite integer,
    depth integer DEFAULT 0,
    hasentite integer DEFAULT 0,
    idresponsable integer
);


ALTER TABLE public.tb_entite OWNER TO postgres;

--
-- TOC entry 3607 (class 0 OID 0)
-- Dependencies: 262
-- Name: TABLE tb_entite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_entite IS 'Liste des services';


--
-- TOC entry 3608 (class 0 OID 0)
-- Dependencies: 262
-- Name: COLUMN tb_entite.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_entite.id IS 'Identifiant';


--
-- TOC entry 3609 (class 0 OID 0)
-- Dependencies: 262
-- Name: COLUMN tb_entite.code; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_entite.code IS 'Code de l''entité';


--
-- TOC entry 3610 (class 0 OID 0)
-- Dependencies: 262
-- Name: COLUMN tb_entite.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_entite.libelle IS 'Libellé de l''entité';


--
-- TOC entry 3611 (class 0 OID 0)
-- Dependencies: 262
-- Name: COLUMN tb_entite.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_entite.description IS 'description de l''entité';


--
-- TOC entry 3612 (class 0 OID 0)
-- Dependencies: 262
-- Name: COLUMN tb_entite.idparent; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_entite.idparent IS 'Identifiant du parent';


--
-- TOC entry 3613 (class 0 OID 0)
-- Dependencies: 262
-- Name: COLUMN tb_entite.estpublie; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_entite.estpublie IS '1 est publié 
0 non publié';


--
-- TOC entry 3614 (class 0 OID 0)
-- Dependencies: 262
-- Name: COLUMN tb_entite.identite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_entite.identite IS 'Identifiant de l''entité parente au haut niveau';


--
-- TOC entry 263 (class 1259 OID 54295)
-- Name: tb_entite_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_entite_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_entite_id_seq OWNER TO postgres;

--
-- TOC entry 3615 (class 0 OID 0)
-- Dependencies: 263
-- Name: tb_entite_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_entite_id_seq OWNED BY public.tb_entite.id;


--
-- TOC entry 264 (class 1259 OID 54297)
-- Name: tb_forum; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_forum (
    id integer NOT NULL,
    titre character varying(255),
    description text,
    dateupdate character varying(255),
    idutilisateur integer,
    typeacces character(1),
    listeacces text
);


ALTER TABLE public.tb_forum OWNER TO postgres;

--
-- TOC entry 265 (class 1259 OID 54303)
-- Name: tb_forum_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_forum_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_forum_id_seq OWNER TO postgres;

--
-- TOC entry 3616 (class 0 OID 0)
-- Dependencies: 265
-- Name: tb_forum_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_forum_id_seq OWNED BY public.tb_forum.id;


--
-- TOC entry 266 (class 1259 OID 54305)
-- Name: tb_groupe; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_groupe (
    id integer NOT NULL,
    libelle character varying(255),
    description text,
    defaut integer DEFAULT 0
);


ALTER TABLE public.tb_groupe OWNER TO postgres;

--
-- TOC entry 3617 (class 0 OID 0)
-- Dependencies: 266
-- Name: TABLE tb_groupe; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_groupe IS 'Liste des groupes d''utilisateurs';


--
-- TOC entry 3618 (class 0 OID 0)
-- Dependencies: 266
-- Name: COLUMN tb_groupe.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_groupe.id IS 'Identifiant';


--
-- TOC entry 3619 (class 0 OID 0)
-- Dependencies: 266
-- Name: COLUMN tb_groupe.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_groupe.libelle IS 'Libellé du groupe';


--
-- TOC entry 3620 (class 0 OID 0)
-- Dependencies: 266
-- Name: COLUMN tb_groupe.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_groupe.description IS 'Description';


--
-- TOC entry 267 (class 1259 OID 54312)
-- Name: tb_groupe_application_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_groupe_application_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_groupe_application_id_seq OWNER TO postgres;

--
-- TOC entry 268 (class 1259 OID 54314)
-- Name: tb_groupe_application; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_groupe_application (
    id integer DEFAULT nextval('public.tb_groupe_application_id_seq'::regclass) NOT NULL,
    idgroupe integer,
    idapplication integer,
    estaccorde integer DEFAULT 0
);


ALTER TABLE public.tb_groupe_application OWNER TO postgres;

--
-- TOC entry 3621 (class 0 OID 0)
-- Dependencies: 268
-- Name: COLUMN tb_groupe_application.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_groupe_application.id IS 'Identifiant';


--
-- TOC entry 3622 (class 0 OID 0)
-- Dependencies: 268
-- Name: COLUMN tb_groupe_application.idgroupe; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_groupe_application.idgroupe IS 'Identifiant du groupe';


--
-- TOC entry 3623 (class 0 OID 0)
-- Dependencies: 268
-- Name: COLUMN tb_groupe_application.idapplication; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_groupe_application.idapplication IS 'Identifiant de l''application';


--
-- TOC entry 269 (class 1259 OID 54319)
-- Name: tb_groupe_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_groupe_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_groupe_id_seq OWNER TO postgres;

--
-- TOC entry 3624 (class 0 OID 0)
-- Dependencies: 269
-- Name: tb_groupe_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_groupe_id_seq OWNED BY public.tb_groupe.id;


--
-- TOC entry 270 (class 1259 OID 54321)
-- Name: tb_historique; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_historique (
    id integer NOT NULL,
    dateaction character varying(255),
    typeaction character varying(255),
    description text,
    idutilisateur integer,
    typeentite character varying(255),
    date date,
    heure character varying(255),
    deleted integer DEFAULT 0,
    utilisateur character varying(255),
    reason text
);


ALTER TABLE public.tb_historique OWNER TO postgres;

--
-- TOC entry 3625 (class 0 OID 0)
-- Dependencies: 270
-- Name: TABLE tb_historique; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_historique IS 'Liste des historiques des actions dans les différents modules';


--
-- TOC entry 3626 (class 0 OID 0)
-- Dependencies: 270
-- Name: COLUMN tb_historique.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_historique.id IS 'Identifiant';


--
-- TOC entry 3627 (class 0 OID 0)
-- Dependencies: 270
-- Name: COLUMN tb_historique.dateaction; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_historique.dateaction IS 'Heure de l''action';


--
-- TOC entry 3628 (class 0 OID 0)
-- Dependencies: 270
-- Name: COLUMN tb_historique.typeaction; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_historique.typeaction IS 'Type d''action';


--
-- TOC entry 3629 (class 0 OID 0)
-- Dependencies: 270
-- Name: COLUMN tb_historique.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_historique.description IS 'Description de l''Historique';


--
-- TOC entry 3630 (class 0 OID 0)
-- Dependencies: 270
-- Name: COLUMN tb_historique.idutilisateur; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_historique.idutilisateur IS 'Identifiant de l''utilisateur ayant effectué l''action';


--
-- TOC entry 3631 (class 0 OID 0)
-- Dependencies: 270
-- Name: COLUMN tb_historique.typeentite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_historique.typeentite IS 'Type de l''entité';


--
-- TOC entry 271 (class 1259 OID 54328)
-- Name: tb_historique_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_historique_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_historique_id_seq OWNER TO postgres;

--
-- TOC entry 3632 (class 0 OID 0)
-- Dependencies: 271
-- Name: tb_historique_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_historique_id_seq OWNED BY public.tb_historique.id;


--
-- TOC entry 272 (class 1259 OID 54330)
-- Name: tb_historique_mail; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_historique_mail (
    id integer NOT NULL,
    dateenvoi timestamp without time zone,
    a character varying(255),
    objet text,
    message text,
    etat text,
    deleted integer DEFAULT 0
);


ALTER TABLE public.tb_historique_mail OWNER TO postgres;

--
-- TOC entry 273 (class 1259 OID 54337)
-- Name: tb_historique_mail_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_historique_mail_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_historique_mail_id_seq OWNER TO postgres;

--
-- TOC entry 3633 (class 0 OID 0)
-- Dependencies: 273
-- Name: tb_historique_mail_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_historique_mail_id_seq OWNED BY public.tb_historique_mail.id;


--
-- TOC entry 274 (class 1259 OID 54339)
-- Name: tb_import; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_import (
    id integer NOT NULL,
    table_name character varying(255),
    libelle character varying(255),
    niveau smallint
);


ALTER TABLE public.tb_import OWNER TO postgres;

--
-- TOC entry 275 (class 1259 OID 54345)
-- Name: tb_import_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_import_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_import_id_seq OWNER TO postgres;

--
-- TOC entry 3634 (class 0 OID 0)
-- Dependencies: 275
-- Name: tb_import_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_import_id_seq OWNED BY public.tb_import.id;


--
-- TOC entry 276 (class 1259 OID 54347)
-- Name: tb_liaison; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_liaison (
    id integer NOT NULL,
    libelle character varying(255),
    codes text,
    designations text
);


ALTER TABLE public.tb_liaison OWNER TO postgres;

--
-- TOC entry 277 (class 1259 OID 54353)
-- Name: tb_liaison_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_liaison_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_liaison_id_seq OWNER TO postgres;

--
-- TOC entry 3635 (class 0 OID 0)
-- Dependencies: 277
-- Name: tb_liaison_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_liaison_id_seq OWNED BY public.tb_liaison.id;


--
-- TOC entry 278 (class 1259 OID 54355)
-- Name: tb_listeautorite; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_listeautorite (
    id integer NOT NULL,
    code character varying(255),
    libelle character varying(255),
    listevaleur text,
    description text,
    estactif integer DEFAULT 1
);


ALTER TABLE public.tb_listeautorite OWNER TO postgres;

--
-- TOC entry 3636 (class 0 OID 0)
-- Dependencies: 278
-- Name: TABLE tb_listeautorite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_listeautorite IS 'Liste des valeurs des combobox pour les formulaires';


--
-- TOC entry 3637 (class 0 OID 0)
-- Dependencies: 278
-- Name: COLUMN tb_listeautorite.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_listeautorite.id IS 'Identifiant';


--
-- TOC entry 3638 (class 0 OID 0)
-- Dependencies: 278
-- Name: COLUMN tb_listeautorite.code; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_listeautorite.code IS 'Code de la liste d''autorité';


--
-- TOC entry 3639 (class 0 OID 0)
-- Dependencies: 278
-- Name: COLUMN tb_listeautorite.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_listeautorite.libelle IS 'Nom de la liste d''autorité';


--
-- TOC entry 3640 (class 0 OID 0)
-- Dependencies: 278
-- Name: COLUMN tb_listeautorite.listevaleur; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_listeautorite.listevaleur IS 'Liste des valeurs de la liste d''autorité';


--
-- TOC entry 3641 (class 0 OID 0)
-- Dependencies: 278
-- Name: COLUMN tb_listeautorite.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_listeautorite.description IS 'Description de la liste d''autorité';


--
-- TOC entry 3642 (class 0 OID 0)
-- Dependencies: 278
-- Name: COLUMN tb_listeautorite.estactif; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_listeautorite.estactif IS '1 si oui, 0 sinon
Defaut 1';


--
-- TOC entry 279 (class 1259 OID 54362)
-- Name: tb_listeautorite_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_listeautorite_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_listeautorite_id_seq OWNER TO postgres;

--
-- TOC entry 3643 (class 0 OID 0)
-- Dependencies: 279
-- Name: tb_listeautorite_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_listeautorite_id_seq OWNED BY public.tb_listeautorite.id;


--
-- TOC entry 280 (class 1259 OID 54364)
-- Name: tb_metadonnee; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_metadonnee (
    id integer NOT NULL,
    libelle character varying(255),
    estactif integer DEFAULT 1,
    idlisteautorite integer,
    taille integer,
    description text,
    idtype integer,
    idtableau integer,
    "order" integer DEFAULT 0,
    mandatory integer DEFAULT 0,
    labeloui character varying(255),
    labelnon character varying(255),
    valeuroui character varying(255),
    valeurnon character varying(255),
    chainegauche character varying(255),
    chainedroite character varying(255),
    longueurnumero integer,
    numerocours integer DEFAULT 1,
    operation text,
    idscolonnelien text,
    idsliaison text,
    separateur character varying(255),
    idunite integer,
    editable integer,
    dateformat character varying(255) DEFAULT 'd/m/Y'::character varying
);


ALTER TABLE public.tb_metadonnee OWNER TO postgres;

--
-- TOC entry 3644 (class 0 OID 0)
-- Dependencies: 280
-- Name: TABLE tb_metadonnee; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_metadonnee IS 'Liste des métadonnées';


--
-- TOC entry 3645 (class 0 OID 0)
-- Dependencies: 280
-- Name: COLUMN tb_metadonnee.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_metadonnee.id IS 'Identifiant';


--
-- TOC entry 3646 (class 0 OID 0)
-- Dependencies: 280
-- Name: COLUMN tb_metadonnee.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_metadonnee.libelle IS 'Libellé de la métadonnée';


--
-- TOC entry 3647 (class 0 OID 0)
-- Dependencies: 280
-- Name: COLUMN tb_metadonnee.estactif; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_metadonnee.estactif IS '1 si oui, 0 sinon Par défaut 1';


--
-- TOC entry 3648 (class 0 OID 0)
-- Dependencies: 280
-- Name: COLUMN tb_metadonnee.idlisteautorite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_metadonnee.idlisteautorite IS 'Identifiant de la liste d''autorité';


--
-- TOC entry 3649 (class 0 OID 0)
-- Dependencies: 280
-- Name: COLUMN tb_metadonnee.taille; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_metadonnee.taille IS 'Taille du texte de type varchar';


--
-- TOC entry 3650 (class 0 OID 0)
-- Dependencies: 280
-- Name: COLUMN tb_metadonnee.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_metadonnee.description IS 'Description de la métadonnée';


--
-- TOC entry 281 (class 1259 OID 54375)
-- Name: tb_metadonnee_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_metadonnee_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_metadonnee_id_seq OWNER TO postgres;

--
-- TOC entry 3651 (class 0 OID 0)
-- Dependencies: 281
-- Name: tb_metadonnee_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_metadonnee_id_seq OWNED BY public.tb_metadonnee.id;


--
-- TOC entry 282 (class 1259 OID 54377)
-- Name: tb_modeleindexation; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_modeleindexation (
    id integer NOT NULL,
    libelle character varying,
    code character varying(255),
    description text,
    estactif integer DEFAULT 1
);


ALTER TABLE public.tb_modeleindexation OWNER TO postgres;

--
-- TOC entry 3652 (class 0 OID 0)
-- Dependencies: 282
-- Name: TABLE tb_modeleindexation; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_modeleindexation IS 'Liste des modèles d''indexation';


--
-- TOC entry 3653 (class 0 OID 0)
-- Dependencies: 282
-- Name: COLUMN tb_modeleindexation.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeleindexation.id IS 'Identifiant';


--
-- TOC entry 3654 (class 0 OID 0)
-- Dependencies: 282
-- Name: COLUMN tb_modeleindexation.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeleindexation.libelle IS 'Libellé du mdèle de traitement';


--
-- TOC entry 3655 (class 0 OID 0)
-- Dependencies: 282
-- Name: COLUMN tb_modeleindexation.code; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeleindexation.code IS 'Code du modèle de traitement';


--
-- TOC entry 3656 (class 0 OID 0)
-- Dependencies: 282
-- Name: COLUMN tb_modeleindexation.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeleindexation.description IS 'Description du modèle de traitement';


--
-- TOC entry 283 (class 1259 OID 54384)
-- Name: tb_modeleindexation_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_modeleindexation_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_modeleindexation_id_seq OWNER TO postgres;

--
-- TOC entry 3657 (class 0 OID 0)
-- Dependencies: 283
-- Name: tb_modeleindexation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_modeleindexation_id_seq OWNED BY public.tb_modeleindexation.id;


--
-- TOC entry 284 (class 1259 OID 54386)
-- Name: tb_modeleindexation_metadonnee; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_modeleindexation_metadonnee (
    id integer NOT NULL,
    idmetadonnee integer,
    idmodeleindexation integer,
    estobligatoire integer DEFAULT 1,
    ordre integer DEFAULT 0,
    idvariable integer,
    idvariabledata integer,
    idcolonne integer
);


ALTER TABLE public.tb_modeleindexation_metadonnee OWNER TO postgres;

--
-- TOC entry 3658 (class 0 OID 0)
-- Dependencies: 284
-- Name: TABLE tb_modeleindexation_metadonnee; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_modeleindexation_metadonnee IS 'Liste des métadonnées des modèles d''indexation';


--
-- TOC entry 3659 (class 0 OID 0)
-- Dependencies: 284
-- Name: COLUMN tb_modeleindexation_metadonnee.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeleindexation_metadonnee.id IS 'Identifiant';


--
-- TOC entry 3660 (class 0 OID 0)
-- Dependencies: 284
-- Name: COLUMN tb_modeleindexation_metadonnee.idmetadonnee; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeleindexation_metadonnee.idmetadonnee IS 'Identifiant de la métadonnée';


--
-- TOC entry 3661 (class 0 OID 0)
-- Dependencies: 284
-- Name: COLUMN tb_modeleindexation_metadonnee.idmodeleindexation; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeleindexation_metadonnee.idmodeleindexation IS 'Identifiant du modèle d''indexation';


--
-- TOC entry 3662 (class 0 OID 0)
-- Dependencies: 284
-- Name: COLUMN tb_modeleindexation_metadonnee.estobligatoire; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeleindexation_metadonnee.estobligatoire IS '1 si oui , 0 sinon 
Par défaut : 1';


--
-- TOC entry 285 (class 1259 OID 54391)
-- Name: tb_modelelecture; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_modelelecture (
    id integer NOT NULL,
    libelle character varying,
    code character varying(255),
    description text,
    estactif integer DEFAULT 1,
    idmodeleindexation integer,
    iddocument integer,
    identities text,
    liensidentites text,
    idclassement integer
);


ALTER TABLE public.tb_modelelecture OWNER TO postgres;

--
-- TOC entry 3663 (class 0 OID 0)
-- Dependencies: 285
-- Name: TABLE tb_modelelecture; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_modelelecture IS 'Liste des modèles de lecture automatique de document';


--
-- TOC entry 3664 (class 0 OID 0)
-- Dependencies: 285
-- Name: COLUMN tb_modelelecture.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modelelecture.id IS 'Identifiant';


--
-- TOC entry 3665 (class 0 OID 0)
-- Dependencies: 285
-- Name: COLUMN tb_modelelecture.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modelelecture.libelle IS 'Libellé de lecture';


--
-- TOC entry 3666 (class 0 OID 0)
-- Dependencies: 285
-- Name: COLUMN tb_modelelecture.code; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modelelecture.code IS 'Code du modèle de lecture';


--
-- TOC entry 3667 (class 0 OID 0)
-- Dependencies: 285
-- Name: COLUMN tb_modelelecture.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modelelecture.description IS 'Description du modèle de lecture';


--
-- TOC entry 286 (class 1259 OID 54398)
-- Name: tb_modelelecture_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_modelelecture_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_modelelecture_id_seq OWNER TO postgres;

--
-- TOC entry 3668 (class 0 OID 0)
-- Dependencies: 286
-- Name: tb_modelelecture_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_modelelecture_id_seq OWNED BY public.tb_modelelecture.id;


--
-- TOC entry 287 (class 1259 OID 54400)
-- Name: tb_modelelecture_metadonnee; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_modelelecture_metadonnee (
    id integer NOT NULL,
    idmetadonnee integer,
    idmodelelecture integer,
    valeur text,
    cle text,
    liencle character varying(255)
);


ALTER TABLE public.tb_modelelecture_metadonnee OWNER TO postgres;

--
-- TOC entry 3669 (class 0 OID 0)
-- Dependencies: 287
-- Name: TABLE tb_modelelecture_metadonnee; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_modelelecture_metadonnee IS 'Liste des métadonnées des modèles de lecture';


--
-- TOC entry 3670 (class 0 OID 0)
-- Dependencies: 287
-- Name: COLUMN tb_modelelecture_metadonnee.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modelelecture_metadonnee.id IS 'Identifiant';


--
-- TOC entry 3671 (class 0 OID 0)
-- Dependencies: 287
-- Name: COLUMN tb_modelelecture_metadonnee.idmetadonnee; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modelelecture_metadonnee.idmetadonnee IS 'Identifiant de la métadonnée';


--
-- TOC entry 288 (class 1259 OID 54406)
-- Name: tb_modelelecture_metadonnee_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_modelelecture_metadonnee_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_modelelecture_metadonnee_id_seq OWNER TO postgres;

--
-- TOC entry 3672 (class 0 OID 0)
-- Dependencies: 288
-- Name: tb_modelelecture_metadonnee_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_modelelecture_metadonnee_id_seq OWNED BY public.tb_modelelecture_metadonnee.id;


--
-- TOC entry 289 (class 1259 OID 54408)
-- Name: tb_modeletraitement; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_modeletraitement (
    id integer NOT NULL,
    code character varying(255),
    libelle character varying(255),
    description character varying,
    estactif integer DEFAULT 0
);


ALTER TABLE public.tb_modeletraitement OWNER TO postgres;

--
-- TOC entry 3673 (class 0 OID 0)
-- Dependencies: 289
-- Name: TABLE tb_modeletraitement; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_modeletraitement IS 'liste des modèles de traitements';


--
-- TOC entry 3674 (class 0 OID 0)
-- Dependencies: 289
-- Name: COLUMN tb_modeletraitement.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeletraitement.id IS 'Identifiant';


--
-- TOC entry 3675 (class 0 OID 0)
-- Dependencies: 289
-- Name: COLUMN tb_modeletraitement.code; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeletraitement.code IS 'Code';


--
-- TOC entry 3676 (class 0 OID 0)
-- Dependencies: 289
-- Name: COLUMN tb_modeletraitement.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeletraitement.libelle IS 'Libelle';


--
-- TOC entry 3677 (class 0 OID 0)
-- Dependencies: 289
-- Name: COLUMN tb_modeletraitement.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeletraitement.description IS 'Description';


--
-- TOC entry 290 (class 1259 OID 54415)
-- Name: tb_modeletraitement_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_modeletraitement_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_modeletraitement_id_seq OWNER TO postgres;

--
-- TOC entry 3678 (class 0 OID 0)
-- Dependencies: 290
-- Name: tb_modeletraitement_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_modeletraitement_id_seq OWNED BY public.tb_modeletraitement.id;


--
-- TOC entry 291 (class 1259 OID 54417)
-- Name: tb_modeletraitement_metadata_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_modeletraitement_metadata_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_modeletraitement_metadata_id_seq OWNER TO postgres;

--
-- TOC entry 3679 (class 0 OID 0)
-- Dependencies: 291
-- Name: tb_modeletraitement_metadata_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_modeletraitement_metadata_id_seq OWNED BY public.tb_modeleindexation_metadonnee.id;


--
-- TOC entry 292 (class 1259 OID 54419)
-- Name: tb_modeletraitement_traitement; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_modeletraitement_traitement (
    id integer NOT NULL,
    idmodeletraitement integer,
    idtraitement integer,
    ordre integer DEFAULT 0 NOT NULL
);


ALTER TABLE public.tb_modeletraitement_traitement OWNER TO postgres;

--
-- TOC entry 3680 (class 0 OID 0)
-- Dependencies: 292
-- Name: TABLE tb_modeletraitement_traitement; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_modeletraitement_traitement IS 'Liste des tâches des modeles de traitement';


--
-- TOC entry 3681 (class 0 OID 0)
-- Dependencies: 292
-- Name: COLUMN tb_modeletraitement_traitement.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeletraitement_traitement.id IS 'Identifiant';


--
-- TOC entry 3682 (class 0 OID 0)
-- Dependencies: 292
-- Name: COLUMN tb_modeletraitement_traitement.idmodeletraitement; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeletraitement_traitement.idmodeletraitement IS 'Identifiant du modèle de traitement';


--
-- TOC entry 3683 (class 0 OID 0)
-- Dependencies: 292
-- Name: COLUMN tb_modeletraitement_traitement.idtraitement; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_modeletraitement_traitement.idtraitement IS 'Identifiant de la tâche';


--
-- TOC entry 293 (class 1259 OID 54423)
-- Name: tb_modeletraitement_tache_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_modeletraitement_tache_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_modeletraitement_tache_id_seq OWNER TO postgres;

--
-- TOC entry 3684 (class 0 OID 0)
-- Dependencies: 293
-- Name: tb_modeletraitement_tache_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_modeletraitement_tache_id_seq OWNED BY public.tb_modeletraitement_traitement.id;


--
-- TOC entry 294 (class 1259 OID 54425)
-- Name: tb_notification; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_notification (
    id integer NOT NULL,
    libelle text,
    idapplication integer
);


ALTER TABLE public.tb_notification OWNER TO postgres;

--
-- TOC entry 295 (class 1259 OID 54431)
-- Name: tb_notification_utilisateur; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_notification_utilisateur (
    id integer NOT NULL,
    idutilisateur integer,
    idnotification integer,
    estaccorde integer DEFAULT 0
);


ALTER TABLE public.tb_notification_utilisateur OWNER TO postgres;

--
-- TOC entry 296 (class 1259 OID 54435)
-- Name: tb_notification_utilisateur_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_notification_utilisateur_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_notification_utilisateur_id_seq OWNER TO postgres;

--
-- TOC entry 3685 (class 0 OID 0)
-- Dependencies: 296
-- Name: tb_notification_utilisateur_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_notification_utilisateur_id_seq OWNED BY public.tb_notification_utilisateur.id;


--
-- TOC entry 297 (class 1259 OID 54437)
-- Name: tb_pays; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_pays (
    id integer NOT NULL,
    libelle character varying(255)
);


ALTER TABLE public.tb_pays OWNER TO postgres;

--
-- TOC entry 3686 (class 0 OID 0)
-- Dependencies: 297
-- Name: TABLE tb_pays; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_pays IS 'Liste des pays';


--
-- TOC entry 3687 (class 0 OID 0)
-- Dependencies: 297
-- Name: COLUMN tb_pays.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_pays.id IS 'Identifiant du pays';


--
-- TOC entry 3688 (class 0 OID 0)
-- Dependencies: 297
-- Name: COLUMN tb_pays.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_pays.libelle IS 'Libellé du pays';


--
-- TOC entry 298 (class 1259 OID 54440)
-- Name: tb_pays_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_pays_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_pays_id_seq OWNER TO postgres;

--
-- TOC entry 3689 (class 0 OID 0)
-- Dependencies: 298
-- Name: tb_pays_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_pays_id_seq OWNED BY public.tb_pays.id;


--
-- TOC entry 299 (class 1259 OID 54442)
-- Name: tb_profil; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_profil (
    id integer NOT NULL,
    libelle character varying(255),
    description text,
    defaut integer DEFAULT 0
);


ALTER TABLE public.tb_profil OWNER TO postgres;

--
-- TOC entry 3690 (class 0 OID 0)
-- Dependencies: 299
-- Name: TABLE tb_profil; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_profil IS 'Liste des groupes d''utilisateur';


--
-- TOC entry 3691 (class 0 OID 0)
-- Dependencies: 299
-- Name: COLUMN tb_profil.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_profil.id IS 'Identifiant';


--
-- TOC entry 3692 (class 0 OID 0)
-- Dependencies: 299
-- Name: COLUMN tb_profil.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_profil.libelle IS 'Libellé du profil';


--
-- TOC entry 3693 (class 0 OID 0)
-- Dependencies: 299
-- Name: COLUMN tb_profil.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_profil.description IS 'Description du profil';


--
-- TOC entry 300 (class 1259 OID 54449)
-- Name: tb_profil_droit; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_profil_droit (
    id integer NOT NULL,
    idprofil integer,
    iddroit integer,
    creer integer DEFAULT 0,
    modifier integer DEFAULT 0,
    supprimer integer DEFAULT 0,
    visualiser integer DEFAULT 0,
    estaccorde integer DEFAULT 0
);


ALTER TABLE public.tb_profil_droit OWNER TO postgres;

--
-- TOC entry 3694 (class 0 OID 0)
-- Dependencies: 300
-- Name: TABLE tb_profil_droit; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_profil_droit IS 'Liste des droits pour les profils';


--
-- TOC entry 3695 (class 0 OID 0)
-- Dependencies: 300
-- Name: COLUMN tb_profil_droit.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_profil_droit.id IS 'Identifiant';


--
-- TOC entry 3696 (class 0 OID 0)
-- Dependencies: 300
-- Name: COLUMN tb_profil_droit.idprofil; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_profil_droit.idprofil IS 'Identifiant du profil';


--
-- TOC entry 3697 (class 0 OID 0)
-- Dependencies: 300
-- Name: COLUMN tb_profil_droit.iddroit; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_profil_droit.iddroit IS 'Identifiant du droit';


--
-- TOC entry 3698 (class 0 OID 0)
-- Dependencies: 300
-- Name: COLUMN tb_profil_droit.creer; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_profil_droit.creer IS 'Droit de créer';


--
-- TOC entry 3699 (class 0 OID 0)
-- Dependencies: 300
-- Name: COLUMN tb_profil_droit.modifier; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_profil_droit.modifier IS 'Droit de modifier';


--
-- TOC entry 3700 (class 0 OID 0)
-- Dependencies: 300
-- Name: COLUMN tb_profil_droit.supprimer; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_profil_droit.supprimer IS 'Droit de supprimer';


--
-- TOC entry 3701 (class 0 OID 0)
-- Dependencies: 300
-- Name: COLUMN tb_profil_droit.visualiser; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_profil_droit.visualiser IS 'Droit de visualiser';


--
-- TOC entry 3702 (class 0 OID 0)
-- Dependencies: 300
-- Name: COLUMN tb_profil_droit.estaccorde; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_profil_droit.estaccorde IS 'True si le droit est accordé au profil
False sinon';


--
-- TOC entry 301 (class 1259 OID 54457)
-- Name: tb_profil_droit_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_profil_droit_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_profil_droit_id_seq OWNER TO postgres;

--
-- TOC entry 3703 (class 0 OID 0)
-- Dependencies: 301
-- Name: tb_profil_droit_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_profil_droit_id_seq OWNED BY public.tb_profil_droit.id;


--
-- TOC entry 302 (class 1259 OID 54459)
-- Name: tb_profil_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_profil_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_profil_id_seq OWNER TO postgres;

--
-- TOC entry 3704 (class 0 OID 0)
-- Dependencies: 302
-- Name: tb_profil_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_profil_id_seq OWNED BY public.tb_profil.id;


--
-- TOC entry 303 (class 1259 OID 54461)
-- Name: tb_quicklaunch; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_quicklaunch (
    id integer NOT NULL,
    itembtn character varying(255),
    idutilisateur integer
);


ALTER TABLE public.tb_quicklaunch OWNER TO postgres;

--
-- TOC entry 304 (class 1259 OID 54464)
-- Name: tb_quicklaunch_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_quicklaunch_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_quicklaunch_id_seq OWNER TO postgres;

--
-- TOC entry 3705 (class 0 OID 0)
-- Dependencies: 304
-- Name: tb_quicklaunch_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_quicklaunch_id_seq OWNED BY public.tb_quicklaunch.id;


--
-- TOC entry 305 (class 1259 OID 54466)
-- Name: tb_redirection; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_redirection (
    id integer NOT NULL,
    iddestinataire integer,
    idcourrier integer,
    dateacceptation character varying(255),
    dateassignation character varying(255),
    msgexpediteur text,
    idexpediteur integer,
    msgdestinataire text,
    etat integer DEFAULT 0,
    datetraitement character varying(255),
    idexecution integer
);


ALTER TABLE public.tb_redirection OWNER TO postgres;

--
-- TOC entry 3706 (class 0 OID 0)
-- Dependencies: 305
-- Name: TABLE tb_redirection; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_redirection IS 'Liste des redirections effectuées sur les courriers';


--
-- TOC entry 3707 (class 0 OID 0)
-- Dependencies: 305
-- Name: COLUMN tb_redirection.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_redirection.id IS 'Identifiant';


--
-- TOC entry 3708 (class 0 OID 0)
-- Dependencies: 305
-- Name: COLUMN tb_redirection.iddestinataire; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_redirection.iddestinataire IS 'Identifiant de l''utilisateur ayant initié la redirection';


--
-- TOC entry 3709 (class 0 OID 0)
-- Dependencies: 305
-- Name: COLUMN tb_redirection.idcourrier; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_redirection.idcourrier IS 'Identifiant du courrier';


--
-- TOC entry 3710 (class 0 OID 0)
-- Dependencies: 305
-- Name: COLUMN tb_redirection.dateacceptation; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_redirection.dateacceptation IS 'Heure de l''acceptation';


--
-- TOC entry 3711 (class 0 OID 0)
-- Dependencies: 305
-- Name: COLUMN tb_redirection.dateassignation; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_redirection.dateassignation IS 'Date et Heure d''assignation du courrier';


--
-- TOC entry 3712 (class 0 OID 0)
-- Dependencies: 305
-- Name: COLUMN tb_redirection.msgexpediteur; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_redirection.msgexpediteur IS 'Message qui accompagne la redirection';


--
-- TOC entry 3713 (class 0 OID 0)
-- Dependencies: 305
-- Name: COLUMN tb_redirection.idexpediteur; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_redirection.idexpediteur IS 'Identifiant de l''expediteur de la redirection';


--
-- TOC entry 3714 (class 0 OID 0)
-- Dependencies: 305
-- Name: COLUMN tb_redirection.etat; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_redirection.etat IS '1 Accepté
0 Valeur par défaut
-1 refusé
2 est traité
3 est redirigé';


--
-- TOC entry 306 (class 1259 OID 54473)
-- Name: tb_redirection_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_redirection_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_redirection_id_seq OWNER TO postgres;

--
-- TOC entry 3715 (class 0 OID 0)
-- Dependencies: 306
-- Name: tb_redirection_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_redirection_id_seq OWNED BY public.tb_redirection.id;


--
-- TOC entry 307 (class 1259 OID 54475)
-- Name: tb_redirection_traitement; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_redirection_traitement (
    id integer NOT NULL,
    idtraitement integer,
    idredirection integer,
    datetraitement character varying(255),
    esttraite integer DEFAULT 0,
    iddocument integer,
    observation text,
    idagenttraiteur integer
);


ALTER TABLE public.tb_redirection_traitement OWNER TO postgres;

--
-- TOC entry 3716 (class 0 OID 0)
-- Dependencies: 307
-- Name: TABLE tb_redirection_traitement; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_redirection_traitement IS 'Liste des tâches des redirections';


--
-- TOC entry 3717 (class 0 OID 0)
-- Dependencies: 307
-- Name: COLUMN tb_redirection_traitement.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_redirection_traitement.id IS 'Identifiant';


--
-- TOC entry 3718 (class 0 OID 0)
-- Dependencies: 307
-- Name: COLUMN tb_redirection_traitement.idtraitement; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_redirection_traitement.idtraitement IS 'Identifiant de la tâche';


--
-- TOC entry 3719 (class 0 OID 0)
-- Dependencies: 307
-- Name: COLUMN tb_redirection_traitement.idredirection; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_redirection_traitement.idredirection IS 'Identfiant de la redirection';


--
-- TOC entry 3720 (class 0 OID 0)
-- Dependencies: 307
-- Name: COLUMN tb_redirection_traitement.datetraitement; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_redirection_traitement.datetraitement IS 'Heure de traitement de la tâche';


--
-- TOC entry 308 (class 1259 OID 54482)
-- Name: tb_redirection_traitement_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_redirection_traitement_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_redirection_traitement_id_seq OWNER TO postgres;

--
-- TOC entry 3721 (class 0 OID 0)
-- Dependencies: 308
-- Name: tb_redirection_traitement_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_redirection_traitement_id_seq OWNED BY public.tb_redirection_traitement.id;


--
-- TOC entry 309 (class 1259 OID 54484)
-- Name: tb_securite; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_securite (
    id integer NOT NULL,
    code character varying(255),
    libelle character varying(255),
    description text,
    estactif integer DEFAULT 1,
    defaut integer DEFAULT 0
);


ALTER TABLE public.tb_securite OWNER TO postgres;

--
-- TOC entry 3722 (class 0 OID 0)
-- Dependencies: 309
-- Name: TABLE tb_securite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_securite IS 'Liste des niveaux de sécurités';


--
-- TOC entry 3723 (class 0 OID 0)
-- Dependencies: 309
-- Name: COLUMN tb_securite.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_securite.id IS 'Identifiant';


--
-- TOC entry 3724 (class 0 OID 0)
-- Dependencies: 309
-- Name: COLUMN tb_securite.code; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_securite.code IS 'Code du niveau de sécurité';


--
-- TOC entry 3725 (class 0 OID 0)
-- Dependencies: 309
-- Name: COLUMN tb_securite.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_securite.libelle IS 'Nom du niveau de sécurité';


--
-- TOC entry 3726 (class 0 OID 0)
-- Dependencies: 309
-- Name: COLUMN tb_securite.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_securite.description IS 'Description du niveau de sécurité';


--
-- TOC entry 3727 (class 0 OID 0)
-- Dependencies: 309
-- Name: COLUMN tb_securite.estactif; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_securite.estactif IS '1 si oui, 0 sinon
Defaut 1';


--
-- TOC entry 310 (class 1259 OID 54492)
-- Name: tb_securite_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_securite_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_securite_id_seq OWNER TO postgres;

--
-- TOC entry 3728 (class 0 OID 0)
-- Dependencies: 310
-- Name: tb_securite_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_securite_id_seq OWNED BY public.tb_securite.id;


--
-- TOC entry 311 (class 1259 OID 54494)
-- Name: tb_securite_profil; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_securite_profil (
    id integer NOT NULL,
    idprofil integer,
    idsecurite integer,
    estaccorde integer DEFAULT 0
);


ALTER TABLE public.tb_securite_profil OWNER TO postgres;

--
-- TOC entry 3729 (class 0 OID 0)
-- Dependencies: 311
-- Name: COLUMN tb_securite_profil.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_securite_profil.id IS 'Identifiant';


--
-- TOC entry 3730 (class 0 OID 0)
-- Dependencies: 311
-- Name: COLUMN tb_securite_profil.idprofil; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_securite_profil.idprofil IS 'Identifiant du profil';


--
-- TOC entry 3731 (class 0 OID 0)
-- Dependencies: 311
-- Name: COLUMN tb_securite_profil.idsecurite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_securite_profil.idsecurite IS 'Identifiant du niveau de sécurité';


--
-- TOC entry 3732 (class 0 OID 0)
-- Dependencies: 311
-- Name: COLUMN tb_securite_profil.estaccorde; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_securite_profil.estaccorde IS '0 sinon et 1 si oui';


--
-- TOC entry 312 (class 1259 OID 54498)
-- Name: tb_securite_profil_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_securite_profil_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_securite_profil_id_seq OWNER TO postgres;

--
-- TOC entry 3733 (class 0 OID 0)
-- Dependencies: 312
-- Name: tb_securite_profil_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_securite_profil_id_seq OWNED BY public.tb_securite_profil.id;


--
-- TOC entry 313 (class 1259 OID 54500)
-- Name: tb_sharedoc; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_sharedoc (
    id integer NOT NULL,
    etat integer DEFAULT 0,
    nom character varying(255),
    datecreation character varying(255),
    idutilisateur integer,
    typeacces character(1),
    listeacces text,
    contenu text,
    idsuperviseur integer,
    idsignataire integer,
    datefinalisation timestamp without time zone,
    finalcontenu text,
    datesignature timestamp without time zone,
    iddocument integer,
    idsdocument text
);


ALTER TABLE public.tb_sharedoc OWNER TO postgres;

--
-- TOC entry 3734 (class 0 OID 0)
-- Dependencies: 313
-- Name: TABLE tb_sharedoc; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_sharedoc IS 'Liste des documents crées';


--
-- TOC entry 3735 (class 0 OID 0)
-- Dependencies: 313
-- Name: COLUMN tb_sharedoc.etat; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_sharedoc.etat IS '0 : en cours, 1 : finalisé, 2 : signé';


--
-- TOC entry 3736 (class 0 OID 0)
-- Dependencies: 313
-- Name: COLUMN tb_sharedoc.nom; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_sharedoc.nom IS 'nom du document';


--
-- TOC entry 3737 (class 0 OID 0)
-- Dependencies: 313
-- Name: COLUMN tb_sharedoc.datecreation; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_sharedoc.datecreation IS 'date de création du document';


--
-- TOC entry 314 (class 1259 OID 54507)
-- Name: tb_sharedoc_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_sharedoc_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_sharedoc_id_seq OWNER TO postgres;

--
-- TOC entry 3738 (class 0 OID 0)
-- Dependencies: 314
-- Name: tb_sharedoc_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_sharedoc_id_seq OWNED BY public.tb_sharedoc.id;


--
-- TOC entry 315 (class 1259 OID 54509)
-- Name: tb_sharedoc_version; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_sharedoc_version (
    id integer NOT NULL,
    etat integer DEFAULT 0,
    datepublication timestamp without time zone,
    datemodification character varying(255),
    idutilisateur integer,
    commentaire text,
    contenu text,
    idsharedoc integer,
    idsdocument text
);


ALTER TABLE public.tb_sharedoc_version OWNER TO postgres;

--
-- TOC entry 3739 (class 0 OID 0)
-- Dependencies: 315
-- Name: TABLE tb_sharedoc_version; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_sharedoc_version IS 'Liste des versions de document créée';


--
-- TOC entry 3740 (class 0 OID 0)
-- Dependencies: 315
-- Name: COLUMN tb_sharedoc_version.etat; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_sharedoc_version.etat IS '0 : en cours, 1 : traité';


--
-- TOC entry 3741 (class 0 OID 0)
-- Dependencies: 315
-- Name: COLUMN tb_sharedoc_version.datepublication; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_sharedoc_version.datepublication IS 'date de publication du document';


--
-- TOC entry 316 (class 1259 OID 54516)
-- Name: tb_sharedoc_version_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_sharedoc_version_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_sharedoc_version_id_seq OWNER TO postgres;

--
-- TOC entry 3742 (class 0 OID 0)
-- Dependencies: 316
-- Name: tb_sharedoc_version_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_sharedoc_version_id_seq OWNED BY public.tb_sharedoc_version.id;


--
-- TOC entry 317 (class 1259 OID 54518)
-- Name: tb_statistique; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_statistique (
    id integer NOT NULL,
    libelle character varying(255),
    idparent integer,
    iconcls character varying(255),
    xtitle character varying(255),
    ytitle character varying(255),
    op character varying(10),
    optitle character varying(255),
    idsgraphique text
);


ALTER TABLE public.tb_statistique OWNER TO postgres;

--
-- TOC entry 318 (class 1259 OID 54524)
-- Name: tb_template; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_template (
    id integer NOT NULL,
    libelle character varying(255),
    contenu text
);


ALTER TABLE public.tb_template OWNER TO postgres;

--
-- TOC entry 319 (class 1259 OID 54530)
-- Name: tb_template_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_template_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_template_id_seq OWNER TO postgres;

--
-- TOC entry 3743 (class 0 OID 0)
-- Dependencies: 319
-- Name: tb_template_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_template_id_seq OWNED BY public.tb_template.id;


--
-- TOC entry 320 (class 1259 OID 54532)
-- Name: tb_tiers; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_tiers (
    id integer NOT NULL,
    nom character varying(255),
    localisation character varying(255),
    adresse character varying(255),
    telephone character varying(255),
    email character varying(255),
    ville character varying(255),
    fax character varying(255),
    site character varying(255),
    description text,
    idpays integer,
    estactif integer DEFAULT 1
);


ALTER TABLE public.tb_tiers OWNER TO postgres;

--
-- TOC entry 321 (class 1259 OID 54539)
-- Name: tb_tiers_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_tiers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_tiers_id_seq OWNER TO postgres;

--
-- TOC entry 3744 (class 0 OID 0)
-- Dependencies: 321
-- Name: tb_tiers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_tiers_id_seq OWNED BY public.tb_tiers.id;


--
-- TOC entry 322 (class 1259 OID 54541)
-- Name: tb_traitement; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_traitement (
    libelle character varying(255),
    description character varying(255),
    id integer NOT NULL,
    estrecurrente integer DEFAULT 0
);


ALTER TABLE public.tb_traitement OWNER TO postgres;

--
-- TOC entry 3745 (class 0 OID 0)
-- Dependencies: 322
-- Name: TABLE tb_traitement; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_traitement IS 'Liste des tâches ou traitements';


--
-- TOC entry 3746 (class 0 OID 0)
-- Dependencies: 322
-- Name: COLUMN tb_traitement.libelle; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_traitement.libelle IS 'Libellé';


--
-- TOC entry 3747 (class 0 OID 0)
-- Dependencies: 322
-- Name: COLUMN tb_traitement.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_traitement.description IS 'Description';


--
-- TOC entry 3748 (class 0 OID 0)
-- Dependencies: 322
-- Name: COLUMN tb_traitement.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_traitement.id IS 'Identifiant';


--
-- TOC entry 3749 (class 0 OID 0)
-- Dependencies: 322
-- Name: COLUMN tb_traitement.estrecurrente; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_traitement.estrecurrente IS '1 si est recurrente, 0 sinon';


--
-- TOC entry 323 (class 1259 OID 54548)
-- Name: tb_traitement_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_traitement_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_traitement_id_seq OWNER TO postgres;

--
-- TOC entry 3750 (class 0 OID 0)
-- Dependencies: 323
-- Name: tb_traitement_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_traitement_id_seq OWNED BY public.tb_traitement.id;


--
-- TOC entry 324 (class 1259 OID 54550)
-- Name: tb_type_graphe; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_type_graphe (
    id integer NOT NULL,
    libelle character varying(255),
    xtype character varying(255)
);


ALTER TABLE public.tb_type_graphe OWNER TO postgres;

--
-- TOC entry 325 (class 1259 OID 54556)
-- Name: tb_typechamp; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_typechamp (
    id integer NOT NULL,
    nom character varying(255),
    libelle character varying(255)
);


ALTER TABLE public.tb_typechamp OWNER TO postgres;

--
-- TOC entry 326 (class 1259 OID 54562)
-- Name: tb_typechamp_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_typechamp_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_typechamp_id_seq OWNER TO postgres;

--
-- TOC entry 3751 (class 0 OID 0)
-- Dependencies: 326
-- Name: tb_typechamp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_typechamp_id_seq OWNED BY public.tb_typechamp.id;


--
-- TOC entry 327 (class 1259 OID 54564)
-- Name: tb_unite; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_unite (
    id integer NOT NULL,
    libelle character varying(255)
);


ALTER TABLE public.tb_unite OWNER TO postgres;

--
-- TOC entry 328 (class 1259 OID 54567)
-- Name: tb_unite_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_unite_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_unite_id_seq OWNER TO postgres;

--
-- TOC entry 3752 (class 0 OID 0)
-- Dependencies: 328
-- Name: tb_unite_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_unite_id_seq OWNED BY public.tb_unite.id;


--
-- TOC entry 329 (class 1259 OID 54569)
-- Name: tb_update; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_update (
    id integer NOT NULL,
    datemiseajour character varying(255),
    version character varying(255),
    commentaire text,
    idutilisateur integer
);


ALTER TABLE public.tb_update OWNER TO postgres;

--
-- TOC entry 330 (class 1259 OID 54575)
-- Name: tb_update_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_update_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_update_id_seq OWNER TO postgres;

--
-- TOC entry 3753 (class 0 OID 0)
-- Dependencies: 330
-- Name: tb_update_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_update_id_seq OWNED BY public.tb_update.id;


--
-- TOC entry 331 (class 1259 OID 54577)
-- Name: tb_utilisateur; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_utilisateur (
    id integer NOT NULL,
    nom character varying(255),
    prenom character varying(255),
    telephone character varying(255),
    email character varying(255),
    login character varying(255),
    motdepasse text,
    lienphoto character varying(255),
    datecreation date DEFAULT now(),
    datederniereconnexion character varying(50),
    civilite character varying(50),
    idprofil integer,
    idgroupe integer,
    identite integer,
    dateexpiration date,
    estactif integer DEFAULT 1,
    estconnecte integer DEFAULT 0,
    acceptealerte integer DEFAULT 0,
    doitchangermotdepasse integer DEFAULT 0,
    datelastactivity timestamp without time zone,
    fonction character varying(255),
    signature character varying(255),
    codesign text,
    idinterim integer,
    ddebutinterim date,
    dfininterim date,
    iddeleguecourrierarrive integer,
    iddeleguecourrierinterne integer,
    iddeleguecourrieraranger integer,
    iddelegueredirection integer,
    salt text,
    dchangedpassword date,
    repsync integer DEFAULT 0
);


ALTER TABLE public.tb_utilisateur OWNER TO postgres;

--
-- TOC entry 3754 (class 0 OID 0)
-- Dependencies: 331
-- Name: TABLE tb_utilisateur; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_utilisateur IS 'Table utilisateur';


--
-- TOC entry 3755 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.id IS 'Identifiant';


--
-- TOC entry 3756 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.nom; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.nom IS 'Nom de l''utilisateur';


--
-- TOC entry 3757 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.prenom; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.prenom IS 'Prénom de l''utilisateur';


--
-- TOC entry 3758 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.telephone; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.telephone IS 'Numéro de téléphone de l''utilisateur';


--
-- TOC entry 3759 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.email; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.email IS 'Email de l''utilisateur';


--
-- TOC entry 3760 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.login; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.login IS 'Login ou identifiant de l''utilisateur';


--
-- TOC entry 3761 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.motdepasse; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.motdepasse IS 'Mot de passe de l''utilisateur';


--
-- TOC entry 3762 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.lienphoto; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.lienphoto IS 'Lien de la photo de l''utilisateur ou nom du fichier';


--
-- TOC entry 3763 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.datecreation; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.datecreation IS 'Date de création';


--
-- TOC entry 3764 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.datederniereconnexion; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.datederniereconnexion IS 'Heure de dernière connexion';


--
-- TOC entry 3765 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.civilite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.civilite IS 'Civilité de l''utilisateur';


--
-- TOC entry 3766 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.idprofil; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.idprofil IS 'Identifiant du groupe';


--
-- TOC entry 3767 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.idgroupe; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.idgroupe IS 'Identifiant du groupe';


--
-- TOC entry 3768 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.identite; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.identite IS 'Identifiant du service';


--
-- TOC entry 3769 (class 0 OID 0)
-- Dependencies: 331
-- Name: COLUMN tb_utilisateur.dateexpiration; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tb_utilisateur.dateexpiration IS 'Date d''expiration du compte
NULL Illimité';


--
-- TOC entry 332 (class 1259 OID 54589)
-- Name: tb_utilisateur_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_utilisateur_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_utilisateur_id_seq OWNER TO postgres;

--
-- TOC entry 3770 (class 0 OID 0)
-- Dependencies: 332
-- Name: tb_utilisateur_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_utilisateur_id_seq OWNED BY public.tb_utilisateur.id;


--
-- TOC entry 333 (class 1259 OID 54591)
-- Name: tb_variable; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tb_variable (
    id integer NOT NULL,
    libelle character varying(255),
    idtype integer,
    idconnexion integer,
    sql text,
    taille integer,
    estsysteme integer DEFAULT 0,
    chainegauche character varying(255),
    chainedroite character varying(255),
    longueurnumero integer,
    numerocours integer DEFAULT 1,
    transmission character varying(255),
    valeur text
);


ALTER TABLE public.tb_variable OWNER TO postgres;

--
-- TOC entry 3771 (class 0 OID 0)
-- Dependencies: 333
-- Name: TABLE tb_variable; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.tb_variable IS 'Une variable est un champ qui permet de stocker une valeur qui peut être utilisé dans les instances des étapes.';


--
-- TOC entry 334 (class 1259 OID 54599)
-- Name: tb_variable_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tb_variable_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.tb_variable_id_seq OWNER TO postgres;

--
-- TOC entry 3772 (class 0 OID 0)
-- Dependencies: 334
-- Name: tb_variable_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tb_variable_id_seq OWNED BY public.tb_variable.id;


--
-- TOC entry 335 (class 1259 OID 54601)
-- Name: tb_archive; Type: TABLE; Schema: starged; Owner: postgres
--

CREATE TABLE starged.tb_archive (
    id integer NOT NULL,
    idaffaire integer,
    idmodeleindexation integer,
    dateenregistrement character varying(255),
    iddocument integer,
    iddossier integer,
    completude character varying(255),
    idclassement integer,
    date date,
    idsecurite integer,
    dua date,
    duc date,
    sof character varying(255),
    datesuppression character varying(255),
    idsupprimeur integer,
    idcourrier integer,
    typeacces character varying(1) DEFAULT 'g'::character varying,
    listeacces text,
    code character varying(255),
    datearchive date,
    description text,
    titre character varying(255),
    idutilisateur integer,
    ts_search tsvector
);


ALTER TABLE starged.tb_archive OWNER TO postgres;

--
-- TOC entry 3773 (class 0 OID 0)
-- Dependencies: 335
-- Name: TABLE tb_archive; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON TABLE starged.tb_archive IS 'Liste des archives';


--
-- TOC entry 3774 (class 0 OID 0)
-- Dependencies: 335
-- Name: COLUMN tb_archive.id; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive.id IS 'Identifiant';


--
-- TOC entry 3775 (class 0 OID 0)
-- Dependencies: 335
-- Name: COLUMN tb_archive.idaffaire; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive.idaffaire IS 'Identifiant de l''affaire';


--
-- TOC entry 3776 (class 0 OID 0)
-- Dependencies: 335
-- Name: COLUMN tb_archive.idmodeleindexation; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive.idmodeleindexation IS 'Identifiant du modèle de traitement';


--
-- TOC entry 3777 (class 0 OID 0)
-- Dependencies: 335
-- Name: COLUMN tb_archive.dateenregistrement; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive.dateenregistrement IS 'Date enregistrement de l''archive';


--
-- TOC entry 3778 (class 0 OID 0)
-- Dependencies: 335
-- Name: COLUMN tb_archive.iddocument; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive.iddocument IS 'Identifiant du document';


--
-- TOC entry 3779 (class 0 OID 0)
-- Dependencies: 335
-- Name: COLUMN tb_archive.iddossier; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive.iddossier IS 'Identifiant du dossier';


--
-- TOC entry 3780 (class 0 OID 0)
-- Dependencies: 335
-- Name: COLUMN tb_archive.date; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive.date IS 'Date de l''enregistrement';


--
-- TOC entry 3781 (class 0 OID 0)
-- Dependencies: 335
-- Name: COLUMN tb_archive.idsecurite; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive.idsecurite IS 'Identifiant du niveau de sécurité';


--
-- TOC entry 3782 (class 0 OID 0)
-- Dependencies: 335
-- Name: COLUMN tb_archive.idsupprimeur; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive.idsupprimeur IS 'Id de l''utilisateur qui a supprimé l''archive';


--
-- TOC entry 336 (class 1259 OID 54608)
-- Name: tb_archive_destruction; Type: TABLE; Schema: starged; Owner: postgres
--

CREATE TABLE starged.tb_archive_destruction (
    id integer NOT NULL,
    code text,
    titre text,
    sof character varying(255),
    dua date,
    duc date,
    iddestruction integer
);


ALTER TABLE starged.tb_archive_destruction OWNER TO postgres;

--
-- TOC entry 337 (class 1259 OID 54614)
-- Name: tb_archive_destruction_id_seq; Type: SEQUENCE; Schema: starged; Owner: postgres
--

CREATE SEQUENCE starged.tb_archive_destruction_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE starged.tb_archive_destruction_id_seq OWNER TO postgres;

--
-- TOC entry 3783 (class 0 OID 0)
-- Dependencies: 337
-- Name: tb_archive_destruction_id_seq; Type: SEQUENCE OWNED BY; Schema: starged; Owner: postgres
--

ALTER SEQUENCE starged.tb_archive_destruction_id_seq OWNED BY starged.tb_archive_destruction.id;


--
-- TOC entry 338 (class 1259 OID 54616)
-- Name: tb_archive_id_seq; Type: SEQUENCE; Schema: starged; Owner: postgres
--

CREATE SEQUENCE starged.tb_archive_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE starged.tb_archive_id_seq OWNER TO postgres;

--
-- TOC entry 3784 (class 0 OID 0)
-- Dependencies: 338
-- Name: tb_archive_id_seq; Type: SEQUENCE OWNED BY; Schema: starged; Owner: postgres
--

ALTER SEQUENCE starged.tb_archive_id_seq OWNED BY starged.tb_archive.id;


--
-- TOC entry 339 (class 1259 OID 54618)
-- Name: tb_archive_metadata; Type: TABLE; Schema: starged; Owner: postgres
--

CREATE TABLE starged.tb_archive_metadata (
    id integer NOT NULL,
    idarchive integer,
    idmetadata integer,
    ts_search tsvector,
    valeur text,
    estobligatoire integer DEFAULT 1,
    idtableau integer,
    mandatory integer DEFAULT 0,
    idvariable integer,
    idvariabledata integer,
    idcolonne integer
);


ALTER TABLE starged.tb_archive_metadata OWNER TO postgres;

--
-- TOC entry 3785 (class 0 OID 0)
-- Dependencies: 339
-- Name: TABLE tb_archive_metadata; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON TABLE starged.tb_archive_metadata IS 'Liste des métadonnées des archives';


--
-- TOC entry 3786 (class 0 OID 0)
-- Dependencies: 339
-- Name: COLUMN tb_archive_metadata.id; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive_metadata.id IS 'Identifiant';


--
-- TOC entry 3787 (class 0 OID 0)
-- Dependencies: 339
-- Name: COLUMN tb_archive_metadata.idarchive; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive_metadata.idarchive IS 'Identifiant de l''archive';


--
-- TOC entry 3788 (class 0 OID 0)
-- Dependencies: 339
-- Name: COLUMN tb_archive_metadata.idmetadata; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive_metadata.idmetadata IS 'Identifiant de la métadonnée';


--
-- TOC entry 3789 (class 0 OID 0)
-- Dependencies: 339
-- Name: COLUMN tb_archive_metadata.ts_search; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive_metadata.ts_search IS 'Valeur de l''archive suivant la métadonnée';


--
-- TOC entry 3790 (class 0 OID 0)
-- Dependencies: 339
-- Name: COLUMN tb_archive_metadata.estobligatoire; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_archive_metadata.estobligatoire IS '1 si oui 
0 sinon';


--
-- TOC entry 340 (class 1259 OID 54626)
-- Name: tb_archive_metadata_id_seq; Type: SEQUENCE; Schema: starged; Owner: postgres
--

CREATE SEQUENCE starged.tb_archive_metadata_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE starged.tb_archive_metadata_id_seq OWNER TO postgres;

--
-- TOC entry 3791 (class 0 OID 0)
-- Dependencies: 340
-- Name: tb_archive_metadata_id_seq; Type: SEQUENCE OWNED BY; Schema: starged; Owner: postgres
--

ALTER SEQUENCE starged.tb_archive_metadata_id_seq OWNED BY starged.tb_archive_metadata.id;


--
-- TOC entry 341 (class 1259 OID 54628)
-- Name: tb_consultation; Type: TABLE; Schema: starged; Owner: postgres
--

CREATE TABLE starged.tb_consultation (
    id integer NOT NULL,
    idarchive integer,
    idutilisateur integer,
    dateconsultation character varying(255),
    dconsultation date
);


ALTER TABLE starged.tb_consultation OWNER TO postgres;

--
-- TOC entry 3792 (class 0 OID 0)
-- Dependencies: 341
-- Name: TABLE tb_consultation; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON TABLE starged.tb_consultation IS 'Table qui enregistre les consultations des archives par les utilisateurs';


--
-- TOC entry 3793 (class 0 OID 0)
-- Dependencies: 341
-- Name: COLUMN tb_consultation.id; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_consultation.id IS 'Identifiant';


--
-- TOC entry 3794 (class 0 OID 0)
-- Dependencies: 341
-- Name: COLUMN tb_consultation.idarchive; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_consultation.idarchive IS 'Identifiant de l''archive';


--
-- TOC entry 3795 (class 0 OID 0)
-- Dependencies: 341
-- Name: COLUMN tb_consultation.idutilisateur; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_consultation.idutilisateur IS 'Identifiant de l''utilisateur';


--
-- TOC entry 3796 (class 0 OID 0)
-- Dependencies: 341
-- Name: COLUMN tb_consultation.dateconsultation; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_consultation.dateconsultation IS 'Heure de consultation';


--
-- TOC entry 342 (class 1259 OID 54631)
-- Name: tb_consultation_id_seq; Type: SEQUENCE; Schema: starged; Owner: postgres
--

CREATE SEQUENCE starged.tb_consultation_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE starged.tb_consultation_id_seq OWNER TO postgres;

--
-- TOC entry 3797 (class 0 OID 0)
-- Dependencies: 342
-- Name: tb_consultation_id_seq; Type: SEQUENCE OWNED BY; Schema: starged; Owner: postgres
--

ALTER SEQUENCE starged.tb_consultation_id_seq OWNED BY starged.tb_consultation.id;


--
-- TOC entry 343 (class 1259 OID 54633)
-- Name: tb_corbeille; Type: TABLE; Schema: starged; Owner: postgres
--

CREATE TABLE starged.tb_corbeille (
    id integer NOT NULL,
    idarchive integer,
    datesuppression character varying(255),
    idutilisateur integer
);


ALTER TABLE starged.tb_corbeille OWNER TO postgres;

--
-- TOC entry 344 (class 1259 OID 54636)
-- Name: tb_corbeille_id_seq; Type: SEQUENCE; Schema: starged; Owner: postgres
--

CREATE SEQUENCE starged.tb_corbeille_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE starged.tb_corbeille_id_seq OWNER TO postgres;

--
-- TOC entry 3798 (class 0 OID 0)
-- Dependencies: 344
-- Name: tb_corbeille_id_seq; Type: SEQUENCE OWNED BY; Schema: starged; Owner: postgres
--

ALTER SEQUENCE starged.tb_corbeille_id_seq OWNED BY starged.tb_corbeille.id;


--
-- TOC entry 345 (class 1259 OID 54638)
-- Name: tb_delete_archive; Type: TABLE; Schema: starged; Owner: postgres
--

CREATE TABLE starged.tb_delete_archive (
    id integer NOT NULL,
    list text,
    datesuppression character varying(255),
    date date,
    observation text
);


ALTER TABLE starged.tb_delete_archive OWNER TO postgres;

--
-- TOC entry 346 (class 1259 OID 54644)
-- Name: tb_delete_archive_id_seq; Type: SEQUENCE; Schema: starged; Owner: postgres
--

CREATE SEQUENCE starged.tb_delete_archive_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE starged.tb_delete_archive_id_seq OWNER TO postgres;

--
-- TOC entry 3799 (class 0 OID 0)
-- Dependencies: 346
-- Name: tb_delete_archive_id_seq; Type: SEQUENCE OWNED BY; Schema: starged; Owner: postgres
--

ALTER SEQUENCE starged.tb_delete_archive_id_seq OWNED BY starged.tb_delete_archive.id;


--
-- TOC entry 347 (class 1259 OID 54646)
-- Name: tb_destruction; Type: TABLE; Schema: starged; Owner: postgres
--

CREATE TABLE starged.tb_destruction (
    id integer NOT NULL,
    idutilisateur integer,
    dateenregistrement character varying(255)
);


ALTER TABLE starged.tb_destruction OWNER TO postgres;

--
-- TOC entry 348 (class 1259 OID 54649)
-- Name: tb_destruction_id_seq; Type: SEQUENCE; Schema: starged; Owner: postgres
--

CREATE SEQUENCE starged.tb_destruction_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE starged.tb_destruction_id_seq OWNER TO postgres;

--
-- TOC entry 3800 (class 0 OID 0)
-- Dependencies: 348
-- Name: tb_destruction_id_seq; Type: SEQUENCE OWNED BY; Schema: starged; Owner: postgres
--

ALTER SEQUENCE starged.tb_destruction_id_seq OWNED BY starged.tb_destruction.id;


--
-- TOC entry 349 (class 1259 OID 54651)
-- Name: tb_repertoire; Type: TABLE; Schema: starged; Owner: postgres
--

CREATE TABLE starged.tb_repertoire (
    id integer NOT NULL,
    libelle character varying(255),
    code character varying(255),
    description text,
    typeacces character varying(1) DEFAULT 'g'::character varying,
    listeacces text
);


ALTER TABLE starged.tb_repertoire OWNER TO postgres;

--
-- TOC entry 3801 (class 0 OID 0)
-- Dependencies: 349
-- Name: TABLE tb_repertoire; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON TABLE starged.tb_repertoire IS 'Liste des répertoires';


--
-- TOC entry 3802 (class 0 OID 0)
-- Dependencies: 349
-- Name: COLUMN tb_repertoire.id; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_repertoire.id IS 'Identifiant';


--
-- TOC entry 3803 (class 0 OID 0)
-- Dependencies: 349
-- Name: COLUMN tb_repertoire.libelle; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_repertoire.libelle IS 'Libellé du répertoire';


--
-- TOC entry 3804 (class 0 OID 0)
-- Dependencies: 349
-- Name: COLUMN tb_repertoire.code; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_repertoire.code IS 'Code du répertoire';


--
-- TOC entry 3805 (class 0 OID 0)
-- Dependencies: 349
-- Name: COLUMN tb_repertoire.description; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_repertoire.description IS 'Description du répertoire';


--
-- TOC entry 3806 (class 0 OID 0)
-- Dependencies: 349
-- Name: COLUMN tb_repertoire.typeacces; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_repertoire.typeacces IS 'g->Général
p->personnel
u->Liste utilisateur
e->entité';


--
-- TOC entry 3807 (class 0 OID 0)
-- Dependencies: 349
-- Name: COLUMN tb_repertoire.listeacces; Type: COMMENT; Schema: starged; Owner: postgres
--

COMMENT ON COLUMN starged.tb_repertoire.listeacces IS 'Liste des id des utilisateurs ou entité ou de l''utilisateur(Cas personnel) ayant accès. Séparateur ,';


--
-- TOC entry 350 (class 1259 OID 54658)
-- Name: tb_repertoire_id_seq; Type: SEQUENCE; Schema: starged; Owner: postgres
--

CREATE SEQUENCE starged.tb_repertoire_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE starged.tb_repertoire_id_seq OWNER TO postgres;

--
-- TOC entry 3808 (class 0 OID 0)
-- Dependencies: 350
-- Name: tb_repertoire_id_seq; Type: SEQUENCE OWNED BY; Schema: starged; Owner: postgres
--

ALTER SEQUENCE starged.tb_repertoire_id_seq OWNED BY starged.tb_repertoire.id;


--
-- TOC entry 2629 (class 2604 OID 54660)
-- Name: tb_archive id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_archive ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_archive_id_seq'::regclass);


--
-- TOC entry 2630 (class 2604 OID 54661)
-- Name: tb_archive_destruction id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_archive_destruction ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_archive_destruction_id_seq'::regclass);


--
-- TOC entry 2633 (class 2604 OID 54662)
-- Name: tb_archive_metadata id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_archive_metadata ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_archive_metadata_id_seq'::regclass);


--
-- TOC entry 2634 (class 2604 OID 54663)
-- Name: tb_auteur id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_auteur ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_auteur_id_seq'::regclass);


--
-- TOC entry 2635 (class 2604 OID 54664)
-- Name: tb_consultation id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_consultation ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_consultation_id_seq'::regclass);


--
-- TOC entry 2643 (class 2604 OID 54665)
-- Name: tb_contenant id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_contenant ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_contenant_id_seq'::regclass);


--
-- TOC entry 2644 (class 2604 OID 54666)
-- Name: tb_contenant_destruction id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_contenant_destruction ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_contenant_destruction_id_seq'::regclass);


--
-- TOC entry 2645 (class 2604 OID 54667)
-- Name: tb_destruction id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_destruction ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_destruction_id_seq'::regclass);


--
-- TOC entry 2646 (class 2604 OID 54668)
-- Name: tb_inventaire id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_inventaire ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_inventaire_id_seq'::regclass);


--
-- TOC entry 2648 (class 2604 OID 54669)
-- Name: tb_inventaire_contenant id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_inventaire_contenant ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_inventaire_contenant_id_seq'::regclass);


--
-- TOC entry 2649 (class 2604 OID 54670)
-- Name: tb_inventaire_rayonnage id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_inventaire_rayonnage ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_inventaire_rayonnage_id_seq'::regclass);


--
-- TOC entry 2651 (class 2604 OID 54671)
-- Name: tb_magasin id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_magasin ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_magasin_id_seq'::regclass);


--
-- TOC entry 2655 (class 2604 OID 54672)
-- Name: tb_meuble id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_meuble ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_meuble_id_seq'::regclass);


--
-- TOC entry 2656 (class 2604 OID 54673)
-- Name: tb_panier id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_panier ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_panier_id_seq'::regclass);


--
-- TOC entry 2657 (class 2604 OID 54674)
-- Name: tb_pret id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_pret ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_pret_id_seq'::regclass);


--
-- TOC entry 2660 (class 2604 OID 54675)
-- Name: tb_pret_archive id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_pret_archive ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_pret_archive_id_seq'::regclass);


--
-- TOC entry 2663 (class 2604 OID 54676)
-- Name: tb_pret_contenant id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_pret_contenant ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_pret_contenant_id_seq'::regclass);


--
-- TOC entry 2666 (class 2604 OID 54677)
-- Name: tb_rayonnage id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_rayonnage ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_rayonnage_id_seq'::regclass);


--
-- TOC entry 2667 (class 2604 OID 54678)
-- Name: tb_retour id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_retour ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_retour_id_seq'::regclass);


--
-- TOC entry 2668 (class 2604 OID 54679)
-- Name: tb_transfert id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_transfert ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_transfert_id_seq'::regclass);


--
-- TOC entry 2672 (class 2604 OID 54680)
-- Name: tb_unite id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_unite ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_unite_id_seq'::regclass);


--
-- TOC entry 2673 (class 2604 OID 54681)
-- Name: tb_versement id; Type: DEFAULT; Schema: ardoc; Owner: postgres
--

ALTER TABLE ONLY ardoc.tb_versement ALTER COLUMN id SET DEFAULT nextval('ardoc.tb_versement_id_seq'::regclass);


--
-- TOC entry 2676 (class 2604 OID 54682)
-- Name: tb_affaire id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_affaire ALTER COLUMN id SET DEFAULT nextval('public.tb_affaire_id_seq'::regclass);


--
-- TOC entry 2677 (class 2604 OID 54683)
-- Name: tb_application id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_application ALTER COLUMN id SET DEFAULT nextval('public.tb_application_id_seq'::regclass);


--
-- TOC entry 2678 (class 2604 OID 54684)
-- Name: tb_backup id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_backup ALTER COLUMN id SET DEFAULT nextval('public.tb_backup_id_seq'::regclass);


--
-- TOC entry 2683 (class 2604 OID 54685)
-- Name: tb_classement id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_classement ALTER COLUMN id SET DEFAULT nextval('public.tb_classement_id_seq'::regclass);


--
-- TOC entry 2685 (class 2604 OID 54686)
-- Name: tb_code id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_code ALTER COLUMN id SET DEFAULT nextval('public.tb_code_id_seq'::regclass);


--
-- TOC entry 2688 (class 2604 OID 54687)
-- Name: tb_colonne id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_colonne ALTER COLUMN id SET DEFAULT nextval('public.tb_colonne_id_seq'::regclass);


--
-- TOC entry 2696 (class 2604 OID 54688)
-- Name: tb_configuration id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_configuration ALTER COLUMN id SET DEFAULT nextval('public.tb_configuration_id_seq'::regclass);


--
-- TOC entry 2697 (class 2604 OID 54689)
-- Name: tb_connexion id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_connexion ALTER COLUMN id SET DEFAULT nextval('public.tb_connexion_id_seq'::regclass);


--
-- TOC entry 2700 (class 2604 OID 54690)
-- Name: tb_conservation id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_conservation ALTER COLUMN id SET DEFAULT nextval('public.tb_conservation_id_seq'::regclass);


--
-- TOC entry 2702 (class 2604 OID 54691)
-- Name: tb_document id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_document ALTER COLUMN id SET DEFAULT nextval('public.tb_document_id_seq'::regclass);


--
-- TOC entry 2706 (class 2604 OID 54692)
-- Name: tb_dossier id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_dossier ALTER COLUMN id SET DEFAULT nextval('public.tb_dossier_id_seq'::regclass);


--
-- TOC entry 2707 (class 2604 OID 54693)
-- Name: tb_droit id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_droit ALTER COLUMN id SET DEFAULT nextval('public.tb_droit_id_seq'::regclass);


--
-- TOC entry 2708 (class 2604 OID 54694)
-- Name: tb_engine id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_engine ALTER COLUMN id SET DEFAULT nextval('public.tb_engine_id_seq'::regclass);


--
-- TOC entry 2712 (class 2604 OID 54695)
-- Name: tb_entite id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_entite ALTER COLUMN id SET DEFAULT nextval('public.tb_entite_id_seq'::regclass);


--
-- TOC entry 2713 (class 2604 OID 54696)
-- Name: tb_forum id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_forum ALTER COLUMN id SET DEFAULT nextval('public.tb_forum_id_seq'::regclass);


--
-- TOC entry 2715 (class 2604 OID 54697)
-- Name: tb_groupe id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_groupe ALTER COLUMN id SET DEFAULT nextval('public.tb_groupe_id_seq'::regclass);


--
-- TOC entry 2719 (class 2604 OID 54698)
-- Name: tb_historique id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_historique ALTER COLUMN id SET DEFAULT nextval('public.tb_historique_id_seq'::regclass);


--
-- TOC entry 2721 (class 2604 OID 54699)
-- Name: tb_historique_mail id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_historique_mail ALTER COLUMN id SET DEFAULT nextval('public.tb_historique_mail_id_seq'::regclass);


--
-- TOC entry 2722 (class 2604 OID 54700)
-- Name: tb_import id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_import ALTER COLUMN id SET DEFAULT nextval('public.tb_import_id_seq'::regclass);


--
-- TOC entry 2723 (class 2604 OID 54701)
-- Name: tb_liaison id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_liaison ALTER COLUMN id SET DEFAULT nextval('public.tb_liaison_id_seq'::regclass);


--
-- TOC entry 2725 (class 2604 OID 54702)
-- Name: tb_listeautorite id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_listeautorite ALTER COLUMN id SET DEFAULT nextval('public.tb_listeautorite_id_seq'::regclass);


--
-- TOC entry 2731 (class 2604 OID 54703)
-- Name: tb_metadonnee id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_metadonnee ALTER COLUMN id SET DEFAULT nextval('public.tb_metadonnee_id_seq'::regclass);


--
-- TOC entry 2733 (class 2604 OID 54704)
-- Name: tb_modeleindexation id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_modeleindexation ALTER COLUMN id SET DEFAULT nextval('public.tb_modeleindexation_id_seq'::regclass);


--
-- TOC entry 2736 (class 2604 OID 54705)
-- Name: tb_modeleindexation_metadonnee id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_modeleindexation_metadonnee ALTER COLUMN id SET DEFAULT nextval('public.tb_modeletraitement_metadata_id_seq'::regclass);


--
-- TOC entry 2738 (class 2604 OID 54706)
-- Name: tb_modelelecture id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_modelelecture ALTER COLUMN id SET DEFAULT nextval('public.tb_modelelecture_id_seq'::regclass);


--
-- TOC entry 2739 (class 2604 OID 54707)
-- Name: tb_modelelecture_metadonnee id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_modelelecture_metadonnee ALTER COLUMN id SET DEFAULT nextval('public.tb_modelelecture_metadonnee_id_seq'::regclass);


--
-- TOC entry 2741 (class 2604 OID 54708)
-- Name: tb_modeletraitement id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_modeletraitement ALTER COLUMN id SET DEFAULT nextval('public.tb_modeletraitement_id_seq'::regclass);


--
-- TOC entry 2743 (class 2604 OID 54709)
-- Name: tb_modeletraitement_traitement id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_modeletraitement_traitement ALTER COLUMN id SET DEFAULT nextval('public.tb_modeletraitement_tache_id_seq'::regclass);


--
-- TOC entry 2745 (class 2604 OID 54710)
-- Name: tb_notification_utilisateur id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_notification_utilisateur ALTER COLUMN id SET DEFAULT nextval('public.tb_notification_utilisateur_id_seq'::regclass);


--
-- TOC entry 2746 (class 2604 OID 54711)
-- Name: tb_pays id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_pays ALTER COLUMN id SET DEFAULT nextval('public.tb_pays_id_seq'::regclass);


--
-- TOC entry 2748 (class 2604 OID 54712)
-- Name: tb_profil id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_profil ALTER COLUMN id SET DEFAULT nextval('public.tb_profil_id_seq'::regclass);


--
-- TOC entry 2754 (class 2604 OID 54713)
-- Name: tb_profil_droit id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_profil_droit ALTER COLUMN id SET DEFAULT nextval('public.tb_profil_droit_id_seq'::regclass);


--
-- TOC entry 2755 (class 2604 OID 54714)
-- Name: tb_quicklaunch id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_quicklaunch ALTER COLUMN id SET DEFAULT nextval('public.tb_quicklaunch_id_seq'::regclass);


--
-- TOC entry 2757 (class 2604 OID 54715)
-- Name: tb_redirection id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_redirection ALTER COLUMN id SET DEFAULT nextval('public.tb_redirection_id_seq'::regclass);


--
-- TOC entry 2759 (class 2604 OID 54716)
-- Name: tb_redirection_traitement id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_redirection_traitement ALTER COLUMN id SET DEFAULT nextval('public.tb_redirection_traitement_id_seq'::regclass);


--
-- TOC entry 2762 (class 2604 OID 54717)
-- Name: tb_securite id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_securite ALTER COLUMN id SET DEFAULT nextval('public.tb_securite_id_seq'::regclass);


--
-- TOC entry 2764 (class 2604 OID 54718)
-- Name: tb_securite_profil id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_securite_profil ALTER COLUMN id SET DEFAULT nextval('public.tb_securite_profil_id_seq'::regclass);


--
-- TOC entry 2766 (class 2604 OID 54719)
-- Name: tb_sharedoc id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_sharedoc ALTER COLUMN id SET DEFAULT nextval('public.tb_sharedoc_id_seq'::regclass);


--
-- TOC entry 2768 (class 2604 OID 54720)
-- Name: tb_sharedoc_version id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_sharedoc_version ALTER COLUMN id SET DEFAULT nextval('public.tb_sharedoc_version_id_seq'::regclass);


--
-- TOC entry 2769 (class 2604 OID 54721)
-- Name: tb_template id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_template ALTER COLUMN id SET DEFAULT nextval('public.tb_template_id_seq'::regclass);


--
-- TOC entry 2771 (class 2604 OID 54722)
-- Name: tb_tiers id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_tiers ALTER COLUMN id SET DEFAULT nextval('public.tb_tiers_id_seq'::regclass);


--
-- TOC entry 2773 (class 2604 OID 54723)
-- Name: tb_traitement id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_traitement ALTER COLUMN id SET DEFAULT nextval('public.tb_traitement_id_seq'::regclass);


--
-- TOC entry 2774 (class 2604 OID 54724)
-- Name: tb_typechamp id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_typechamp ALTER COLUMN id SET DEFAULT nextval('public.tb_typechamp_id_seq'::regclass);


--
-- TOC entry 2775 (class 2604 OID 54725)
-- Name: tb_unite id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_unite ALTER COLUMN id SET DEFAULT nextval('public.tb_unite_id_seq'::regclass);


--
-- TOC entry 2776 (class 2604 OID 54726)
-- Name: tb_update id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_update ALTER COLUMN id SET DEFAULT nextval('public.tb_update_id_seq'::regclass);


--
-- TOC entry 2783 (class 2604 OID 54727)
-- Name: tb_utilisateur id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_utilisateur ALTER COLUMN id SET DEFAULT nextval('public.tb_utilisateur_id_seq'::regclass);


--
-- TOC entry 2786 (class 2604 OID 54728)
-- Name: tb_variable id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tb_variable ALTER COLUMN id SET DEFAULT nextval('public.tb_variable_id_seq'::regclass);


--
-- TOC entry 2788 (class 2604 OID 54729)
-- Name: tb_archive id; Type: DEFAULT; Schema: starged; Owner: postgres
--

ALTER TABLE ONLY starged.tb_archive ALTER COLUMN id SET DEFAULT nextval('starged.tb_archive_id_seq'::regclass);


--
-- TOC entry 2789 (class 2604 OID 54730)
-- Name: tb_archive_destruction id; Type: DEFAULT; Schema: starged; Owner: postgres
--

ALTER TABLE ONLY starged.tb_archive_destruction ALTER COLUMN id SET DEFAULT nextval('starged.tb_archive_destruction_id_seq'::regclass);


--
-- TOC entry 2792 (class 2604 OID 54731)
-- Name: tb_archive_metadata id; Type: DEFAULT; Schema: starged; Owner: postgres
--

ALTER TABLE ONLY starged.tb_archive_metadata ALTER COLUMN id SET DEFAULT nextval('starged.tb_archive_metadata_id_seq'::regclass);


--
-- TOC entry 2793 (class 2604 OID 54732)
-- Name: tb_consultation id; Type: DEFAULT; Schema: starged; Owner: postgres
--

ALTER TABLE ONLY starged.tb_consultation ALTER COLUMN id SET DEFAULT nextval('starged.tb_consultation_id_seq'::regclass);


--
-- TOC entry 2794 (class 2604 OID 54733)
-- Name: tb_corbeille id; Type: DEFAULT; Schema: starged; Owner: postgres
--

ALTER TABLE ONLY starged.tb_corbeille ALTER COLUMN id SET DEFAULT nextval('starged.tb_corbeille_id_seq'::regclass);


--
-- TOC entry 2795 (class 2604 OID 54734)
-- Name: tb_delete_archive id; Type: DEFAULT; Schema: starged; Owner: postgres
--

ALTER TABLE ONLY starged.tb_delete_archive ALTER COLUMN id SET DEFAULT nextval('starged.tb_delete_archive_id_seq'::regclass);


--
-- TOC entry 2796 (class 2604 OID 54735)
-- Name: tb_destruction id; Type: DEFAULT; Schema: starged; Owner: postgres
--

ALTER TABLE ONLY starged.tb_destruction ALTER COLUMN id SET DEFAULT nextval('starged.tb_destruction_id_seq'::regclass);


--
-- TOC entry 2798 (class 2604 OID 54736)
-- Name: tb_repertoire id; Type: DEFAULT; Schema: starged; Owner: postgres
--

ALTER TABLE ONLY starged.tb_repertoire ALTER COLUMN id SET DEFAULT nextval('starged.tb_repertoire_id_seq'::regclass);


--
-- TOC entry 3224 (class 0 OID 53968)
-- Dependencies: 189
-- Data for Name: tb_archive; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3225 (class 0 OID 53977)
-- Dependencies: 190
-- Data for Name: tb_archive_destruction; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3809 (class 0 OID 0)
-- Dependencies: 191
-- Name: tb_archive_destruction_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_archive_destruction_id_seq', 1, false);


--
-- TOC entry 3810 (class 0 OID 0)
-- Dependencies: 192
-- Name: tb_archive_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_archive_id_seq', 1, false);


--
-- TOC entry 3228 (class 0 OID 53987)
-- Dependencies: 193
-- Data for Name: tb_archive_metadata; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3811 (class 0 OID 0)
-- Dependencies: 194
-- Name: tb_archive_metadata_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_archive_metadata_id_seq', 1, false);


--
-- TOC entry 3230 (class 0 OID 53997)
-- Dependencies: 195
-- Data for Name: tb_auteur; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3812 (class 0 OID 0)
-- Dependencies: 196
-- Name: tb_auteur_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_auteur_id_seq', 1, false);


--
-- TOC entry 3232 (class 0 OID 54002)
-- Dependencies: 197
-- Data for Name: tb_consultation; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3813 (class 0 OID 0)
-- Dependencies: 198
-- Name: tb_consultation_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_consultation_id_seq', 1, false);


--
-- TOC entry 3234 (class 0 OID 54007)
-- Dependencies: 199
-- Data for Name: tb_contenant; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3235 (class 0 OID 54020)
-- Dependencies: 200
-- Data for Name: tb_contenant_destruction; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3814 (class 0 OID 0)
-- Dependencies: 201
-- Name: tb_contenant_destruction_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_contenant_destruction_id_seq', 1, false);


--
-- TOC entry 3815 (class 0 OID 0)
-- Dependencies: 202
-- Name: tb_contenant_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_contenant_id_seq', 1, false);


--
-- TOC entry 3238 (class 0 OID 54030)
-- Dependencies: 203
-- Data for Name: tb_destruction; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3816 (class 0 OID 0)
-- Dependencies: 204
-- Name: tb_destruction_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_destruction_id_seq', 1, false);


--
-- TOC entry 3240 (class 0 OID 54035)
-- Dependencies: 205
-- Data for Name: tb_inventaire; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3241 (class 0 OID 54041)
-- Dependencies: 206
-- Data for Name: tb_inventaire_contenant; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3817 (class 0 OID 0)
-- Dependencies: 207
-- Name: tb_inventaire_contenant_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_inventaire_contenant_id_seq', 1, false);


--
-- TOC entry 3818 (class 0 OID 0)
-- Dependencies: 208
-- Name: tb_inventaire_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_inventaire_id_seq', 1, false);


--
-- TOC entry 3244 (class 0 OID 54052)
-- Dependencies: 209
-- Data for Name: tb_inventaire_rayonnage; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3819 (class 0 OID 0)
-- Dependencies: 210
-- Name: tb_inventaire_rayonnage_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_inventaire_rayonnage_id_seq', 1, false);


--
-- TOC entry 3246 (class 0 OID 54057)
-- Dependencies: 211
-- Data for Name: tb_magasin; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3820 (class 0 OID 0)
-- Dependencies: 212
-- Name: tb_magasin_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_magasin_id_seq', 1, false);


--
-- TOC entry 3248 (class 0 OID 54066)
-- Dependencies: 213
-- Data for Name: tb_meuble; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3821 (class 0 OID 0)
-- Dependencies: 214
-- Name: tb_meuble_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_meuble_id_seq', 20, true);


--
-- TOC entry 3250 (class 0 OID 54077)
-- Dependencies: 215
-- Data for Name: tb_panier; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3822 (class 0 OID 0)
-- Dependencies: 216
-- Name: tb_panier_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_panier_id_seq', 1, false);


--
-- TOC entry 3252 (class 0 OID 54082)
-- Dependencies: 217
-- Data for Name: tb_pret; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3253 (class 0 OID 54088)
-- Dependencies: 218
-- Data for Name: tb_pret_archive; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3823 (class 0 OID 0)
-- Dependencies: 219
-- Name: tb_pret_archive_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_pret_archive_id_seq', 1, false);


--
-- TOC entry 3255 (class 0 OID 54095)
-- Dependencies: 220
-- Data for Name: tb_pret_contenant; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3824 (class 0 OID 0)
-- Dependencies: 221
-- Name: tb_pret_contenant_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_pret_contenant_id_seq', 1, false);


--
-- TOC entry 3825 (class 0 OID 0)
-- Dependencies: 222
-- Name: tb_pret_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_pret_id_seq', 1, false);


--
-- TOC entry 3258 (class 0 OID 54104)
-- Dependencies: 223
-- Data for Name: tb_rayonnage; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3826 (class 0 OID 0)
-- Dependencies: 224
-- Name: tb_rayonnage_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_rayonnage_id_seq', 1, false);


--
-- TOC entry 3260 (class 0 OID 54114)
-- Dependencies: 225
-- Data for Name: tb_retour; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3827 (class 0 OID 0)
-- Dependencies: 226
-- Name: tb_retour_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_retour_id_seq', 1, false);


--
-- TOC entry 3262 (class 0 OID 54122)
-- Dependencies: 227
-- Data for Name: tb_transfert; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3828 (class 0 OID 0)
-- Dependencies: 228
-- Name: tb_transfert_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_transfert_id_seq', 1, false);


--
-- TOC entry 3265 (class 0 OID 54132)
-- Dependencies: 230
-- Data for Name: tb_type; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3829 (class 0 OID 0)
-- Dependencies: 229
-- Name: tb_type_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_type_id_seq', 1, false);


--
-- TOC entry 3266 (class 0 OID 54140)
-- Dependencies: 231
-- Data for Name: tb_unite; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--

INSERT INTO ardoc.tb_unite (id, description, libelle, valeur1, estpublie, valeur2) VALUES (1, 'Mètre cube', 'M<sup>3</sup>', 1.000, 1, 4.000);
INSERT INTO ardoc.tb_unite (id, description, libelle, valeur1, estpublie, valeur2) VALUES (2, 'Mètre linétaire', 'ML', 4.000, 0, 1.000);


--
-- TOC entry 3830 (class 0 OID 0)
-- Dependencies: 232
-- Name: tb_unite_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_unite_id_seq', 3, true);


--
-- TOC entry 3268 (class 0 OID 54149)
-- Dependencies: 233
-- Data for Name: tb_versement; Type: TABLE DATA; Schema: ardoc; Owner: postgres
--



--
-- TOC entry 3831 (class 0 OID 0)
-- Dependencies: 234
-- Name: tb_versement_id_seq; Type: SEQUENCE SET; Schema: ardoc; Owner: postgres
--

SELECT pg_catalog.setval('ardoc.tb_versement_id_seq', 1, false);


--
-- TOC entry 3270 (class 0 OID 54157)
-- Dependencies: 235
-- Data for Name: tb_affaire; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- TOC entry 3832 (class 0 OID 0)
-- Dependencies: 236
-- Name: tb_affaire_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.tb_affaire_id_seq', 1, false);


--
-- TOC entry 3272 (class 0 OID 54167)
-- Dependencies: 237
-- Data for Name: tb_application; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.tb_application (id, libelle, description) VALUES (3, 'Module ARDOC', 'Gestion Electronique des Archives Physiques');
INSERT INTO public.tb_application (id, libelle, description) VALUES (2, 'Module SAE', 'Solution d''Archivage Electronique');


--
-- TOC entry 3833 (class 0 OID 0)
-- Dependencies: 238
-- Name: tb_application_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.tb_application_id_seq', 1, false);


--
-- TOC entry 3274 (class 0 OID 54175)
-- Dependencies: 239
-- Data for Name: tb_backup; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- TOC entry 3834 (class 0 OID 0)
-- Dependencies: 240
-- Name: tb_backup_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.tb_backup_id_seq', 1, false);


--
-- TOC entry 3276 (class 0 OID 54183)
-- Dependencies: 241
-- Data for Name: tb_classement; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (181, 'PL01-1300', 'Politiques et procédures administratives', NULL, 171, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (170, 'PL01', 'Plan de classement des archives de la commune de Nkolafamba', 'Plan de classement version 01', NULL, 1, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (171, 'PL01-1000', 'Administration et organisation', NULL, 170, 0, 170, 2, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (172, 'PL01-2000', 'État civil et démographie', NULL, 170, 0, 170, 2, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (173, 'PL01-3000', 'Développement local', NULL, 170, 0, 170, 2, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (174, 'PL01-4000', 'Relations publiques et Coopération', NULL, 170, 0, 170, 2, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (175, 'PL01-5000', 'Gestion financière', NULL, 170, 0, 170, 2, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (176, 'PL01-6000', 'Gestion du patrimoine', NULL, 170, 0, 170, 2, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (177, 'PL01-7000', 'Gestion des ressources humaines', NULL, 170, 0, 170, 2, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (211, 'PL01-7300', 'Comité RH', NULL, 177, 0, 170, 3, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (215, 'PL01-7700', 'Vie associative et syndicale', NULL, 177, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (216, 'PL01-7800', 'Activités sportives et culturelles du personnel', NULL, 177, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (178, 'PL01-8000', 'Systèmes d''information', NULL, 170, 0, 170, 2, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (221, 'PL01-1120', 'Organisation de la commune', NULL, 179, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 1, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (179, 'PL01-1100', 'Création, organisation et évolution de commune', NULL, 171, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (180, 'PL01-1200', 'Administration générale', NULL, 171, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (182, 'PL01-1400', 'Planification', NULL, 171, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (226, 'PL01-1410', 'Développement Communal', NULL, 182, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (227, 'PL01-1420', 'Planification gestion des déchets et de l’environnement', NULL, 182, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (228, 'PL01-1430', 'Planning des activités', NULL, 182, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (183, 'PL01-1500', 'Étude, audit et contrôle ', NULL, 171, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (230, 'PL01-1520', 'Audits et controles', NULL, 183, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (229, 'PL01-1510', 'Etudes', NULL, 183, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (184, 'PL01-1600', 'Gestion des projets', NULL, 171, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (231, 'PL01-1610', 'Élaboration et maturation des projets', NULL, 184, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (232, 'PL01-1620', 'Exécution des projets', NULL, 184, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (185, 'PL01-1700', 'Gestion des affaires juridiques', NULL, 171, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (233, 'PL01-1710', 'Assistance juridique', NULL, 185, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (234, 'PL01-1720', 'Gestion des contrats', NULL, 185, 0, 170, 4, NULL, NULL, NULL, NULL, 5, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (235, 'PL01-1730', 'Élaboration des actes administratifs', NULL, 185, 0, 170, 4, NULL, NULL, NULL, NULL, 6, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (236, 'PL01-1740', 'Gestion des contentieux et arbitrage', NULL, 185, 0, 170, 4, NULL, NULL, NULL, NULL, 5, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (237, 'PL01-1750', 'Suivi de l’exécutions de décisions de justice', NULL, 185, 0, 170, 4, NULL, NULL, NULL, NULL, 6, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (186, 'PL01-2100', 'Recensements et études démographiques', NULL, 172, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (238, 'PL01-2110', 'Recensements', NULL, 186, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (239, 'PL01-2120', 'Études démographiques', NULL, 186, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (187, 'PL01-2200', 'Tenue des registres d’état civil', NULL, 172, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (240, 'PL01-2210', 'Enregistrement des naissances', NULL, 187, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (241, 'PL01-2220', 'Enregistrement des mariages', NULL, 187, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (242, 'PL01-2230', 'Enregistrement des décès', NULL, 187, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (243, 'PL01-2240', 'Gestion des requêtes liées à l’état civil', NULL, 187, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (188, 'PL01-3100', 'Développement économique', NULL, 173, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (189, 'PL01-3200', 'Développement du tourisme', NULL, 173, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (195, 'PL01-4100', 'Communication', NULL, 174, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (196, 'PL01-4200', 'Jumelage', NULL, 174, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (197, 'PL01-4300', 'Suivi des actions externes de développement', NULL, 174, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (198, 'PL01-4400', 'Financement', NULL, 174, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (199, 'PL01-4500', 'Participation aux évènements ', NULL, 174, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (200, 'PL01-5100', 'Gestion budgétaire', NULL, 175, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (201, 'PL01-5200', 'Gestion des recettes municipales', NULL, 175, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (202, 'PL01-5300', 'Contrôle financier', NULL, 175, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (203, 'PL01-5400', 'Mandatement', NULL, 175, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (204, 'PL01-5500', 'Gestion de la trésorerie', NULL, 175, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (205, 'PL01-6100', 'Gestion du patrimoine immobilier', NULL, 176, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (206, 'PL01-6200', 'Gestion des approvisionnements', NULL, 176, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (207, 'PL01-6300', 'Suivi du patrimoine et des stocks', NULL, 176, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (209, 'PL01-7100', 'Emploi', NULL, 177, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (210, 'PL01-7200', 'Administration du personnel ', NULL, 177, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (208, 'PL01-6400', 'Gestion des sorties / aliénations', NULL, 176, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (212, 'PL01-7400', 'Prévoyance sociale', NULL, 177, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (213, 'PL01-7500', 'Assurance du personnel', NULL, 177, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (217, 'PL01-8100', 'Gestion du système d’information', NULL, 178, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (214, 'PL01-7600', 'Évaluation et formation du personnel', NULL, 177, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (218, 'PL01-8200', 'Gestion des Archives', NULL, 178, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (219, 'PL01-8300', 'Gestion de la documentation', NULL, 178, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (220, 'PL01-1110', 'Érection de la commune', NULL, 179, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 1, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (223, 'PL01-1220', 'Coordination des services municipaux', NULL, 180, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 1, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (225, 'PL01-1320', 'Procédures', NULL, 181, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 1, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (224, 'PL01-1310', 'Politiques', NULL, 181, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 1, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (222, 'PL01-1210', 'Conseil Municipal', NULL, 180, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 1, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (244, 'PL01-3110', 'Études d’impact économique', NULL, 188, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (245, 'PL01-3120', 'Définition de la stratégie de développement', NULL, 188, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (246, 'PL01-3130', 'Promotion de la stratégie de développement économique', NULL, 188, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (247, 'PL01-3140', 'Suivi évaluation de la stratégie de développement', NULL, 188, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (248, 'PL01-3210', 'Définition des orientations stratégiques', NULL, 189, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (320, 'PL01-6310', 'Inventaire de base', NULL, 207, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (249, 'PL01-3220', 'Animation des professionnels du tourisme', NULL, 189, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (250, 'PL01-3230', 'Promotion des sites touristiques', NULL, 189, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (251, 'PL01-3240', 'Suivi évaluation dispositif de développement du tourisme', NULL, 189, 0, 170, 4, NULL, NULL, NULL, NULL, 9, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (293, 'PL01-5110', 'Élaboration du budget', NULL, 200, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (252, 'PL01-3300', 'Protection de l’environnement et hygiène publique', NULL, 173, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (257, 'PL01-3310', 'Étude d’impact environnemental', NULL, 252, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (258, 'PL01-3320', 'Définition de les stratégie d’hygiène et de protection de l’environnement', NULL, 252, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (259, 'PL01-3330', 'Sensibilisation des populations', NULL, 252, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (260, 'PL01-3340', 'Contrôles et inspections', NULL, 252, 0, 170, 4, NULL, NULL, NULL, NULL, 9, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (261, 'PL01-3350', 'Suivi évaluation des travaux d’hygiène', NULL, 252, 0, 170, 4, NULL, NULL, NULL, NULL, 9, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (262, 'PL01-3360', 'Gestion des espaces verts', NULL, 252, 0, 170, 4, NULL, NULL, NULL, NULL, 9, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (253, 'PL01-3400', 'Aménagement urbain', NULL, 173, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (263, 'PL01-3410', 'Mise en œuvre du plan d’aménagement', NULL, 253, 0, 170, 4, NULL, NULL, NULL, NULL, 9, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (265, 'PL01-3430', 'Étude topographique', NULL, 253, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (264, 'PL01-3420', 'Constats et contrôles techniques (Plans d’urbanisme, respect des normes de construction…)', NULL, 253, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (266, 'PL01-3440', 'Permis de bâtir', NULL, 253, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (267, 'PL01-3450', 'Permis d’implanter', NULL, 253, 0, 170, 4, NULL, NULL, NULL, NULL, 9, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (268, 'PL01-3460', 'Autorisation de détruire', NULL, 253, 0, 170, 4, NULL, NULL, NULL, NULL, 9, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (269, 'PL01-3470', 'Surveillance du domaine public (déguerpissements, mise en fourrière, signalement et arrêts des activités non autorisées)', NULL, 253, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (270, 'PL01-3480', 'Amendes / sanctions', NULL, 253, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (254, 'PL01-3500', 'Service à la population', NULL, 173, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (271, 'PL01-3510', 'Recensement des besoins non satisfaits', NULL, 254, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (272, 'PL01-3520', 'Enquêtes sociales ', NULL, 254, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (273, 'PL01-3530', 'Action sociale', NULL, 254, 0, 170, 4, NULL, NULL, NULL, NULL, 9, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (255, 'PL01-3600', 'Encadrement de la jeunesse', NULL, 173, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (274, 'PL01-3610', 'Évaluation des besoins de construction et de maintenance d’établissements scolaires et d’accueil', NULL, 255, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (275, 'PL01-3620', 'Évaluation des besoins d’infrastructures de loisirs', NULL, 255, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (276, 'PL01-3630', 'Mise en œuvre des programmes jeunesse', NULL, 255, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (277, 'PL01-3640', 'Suivi de la gestion des établissements scolaires et de loisirs', NULL, 255, 0, 170, 4, NULL, NULL, NULL, NULL, 9, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (278, 'PL01-3650', 'Encadrement des mouvements jeunes', NULL, 255, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (256, 'PL01-3700', 'Développement culturel', NULL, 173, 0, 170, 3, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (279, 'PL01-3710', 'Construction des infrastructures culturelles', NULL, 256, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (280, 'PL01-3720', 'Gestion des établissements culturels', NULL, 256, 0, 170, 4, NULL, NULL, NULL, NULL, 9, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (282, 'PL01-4110', 'Relations avec les médias', NULL, 195, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (283, 'PL01-4120', 'Communication évènementielle', NULL, 195, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (284, 'PL01-4130', 'Assistance des services', NULL, 195, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (285, 'PL01-4210', 'Recherche et préparation jumelage', NULL, 196, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (286, 'PL01-4220', 'Suivi des jumelages', NULL, 196, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (287, 'PL01-4310', 'Suivi des initiatives publiques / Coopération décentralisée', NULL, 197, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (288, 'PL01-4320', 'Suivi des initiatives privées', NULL, 197, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (289, 'PL01-4410', 'Recherche de financement', NULL, 198, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (290, 'PL01-4420', 'Suivi des financements', NULL, 198, 0, 170, 4, NULL, NULL, NULL, NULL, 9, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (291, 'PL01-4510', 'Évènements nationaux', NULL, 199, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (292, 'PL01-4520', 'Évènements internationaux', NULL, 199, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (294, 'PL01-5120', 'Suivi exécution du budget', NULL, 200, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (296, 'PL01-5210', 'Identification des contribuables', NULL, 201, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (297, 'PL01-5220', 'Liquidation et émission des ordres de recettes', NULL, 201, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (298, 'PL01-5230', 'Perception des taxes', NULL, 201, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (299, 'PL01-5240', 'Reporting fiscal', NULL, 201, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (300, 'PL01-5310', 'Contrôle de la régularité des dépenses et du respect des procédures', NULL, 202, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (301, 'PL01-5320', 'Contrôle les opérations de gestion financière des services', NULL, 202, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (302, 'PL01-5330', 'Analyses et études financières', NULL, 202, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (303, 'PL01-5340', 'Analyses et études financières', NULL, 202, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (304, 'PL01-5350', 'Contrôle des achats', NULL, 202, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (305, 'PL01-5360', 'Reporting financier', NULL, 202, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (306, 'PL01-5410', 'Émission des titres de dépenses', NULL, 203, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (307, 'PL01-5420', 'Saisie des opérations', NULL, 203, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (308, 'PL01-5510', 'Opérations de trésorerie', NULL, 204, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (309, 'PL01-5520', 'Suivi des opérations de trésorerie', NULL, 204, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (310, 'PL01-5530', 'Gestion des caisses d’avance', NULL, 204, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (311, 'PL01-5540', 'Contrôle caisse', NULL, 204, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (312, 'PL01-6110', 'Acquisition d’immeuble', NULL, 205, 0, 170, 4, NULL, NULL, NULL, NULL, 2, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (313, 'PL01-6120', 'Location d’immeuble', NULL, 205, 0, 170, 4, NULL, NULL, NULL, NULL, 9, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (314, 'PL01-6130', 'Entretien immobilier', NULL, 205, 0, 170, 4, NULL, NULL, NULL, NULL, 9, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (315, 'PL01-6140', 'Vente d’immeuble', NULL, 205, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (316, 'PL01-6210', 'Expression et analyse des besoins', NULL, 206, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (317, 'PL01-6220', 'Commande publique', NULL, 206, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (318, 'PL01-6230', 'Réception des commandes', NULL, 206, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (319, 'PL01-6240', 'Évaluation de la qualité des  fournitures et matériels', NULL, 206, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (321, 'PL01-6320', 'Inventaire et récolement périodique', NULL, 207, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (322, 'PL01-6330', 'Suivi de la comptabilité matière', NULL, 207, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (323, 'PL01-6410', 'Collecte des besoins', NULL, 208, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (324, 'PL01-6420', 'Sortie du stock', NULL, 208, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (325, 'PL01-7110', 'Expression et analyse des besoins en ressources humaines', NULL, 209, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (326, 'PL01-7120', 'Candidature', NULL, 209, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (327, 'PL01-7130', 'Recrutement', NULL, 209, 0, 170, 4, NULL, NULL, NULL, NULL, 8, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (328, 'PL01-7210', 'Gestion de la présence et des carrières', NULL, 210, 0, 170, 4, NULL, NULL, NULL, NULL, 8, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (329, 'PL01-7220', 'Gestion des missions et voyages', NULL, 210, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (330, 'PL01-7230', 'Médaille de travail et récompenses', NULL, 210, 0, 170, 4, NULL, NULL, NULL, NULL, 8, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (331, 'PL01-7240', 'Gestion de la discipline', NULL, 210, 0, 170, 4, NULL, NULL, NULL, NULL, 8, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (332, 'PL01-7250', 'Gestion des conflits sociaux', NULL, 210, 0, 170, 4, NULL, NULL, NULL, NULL, 8, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (333, 'PL01-7260', 'Gestion du personnel temporaires', NULL, 210, 0, 170, 4, NULL, NULL, NULL, NULL, 8, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (334, 'PL01-7270', 'Départ du personnel', NULL, 210, 0, 170, 4, NULL, NULL, NULL, NULL, 8, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (335, 'PL01-7280', 'Reporting social /RH', NULL, 210, 0, 170, 4, NULL, NULL, NULL, NULL, 8, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (336, 'PL01-7290', 'Gestion de la paie et de la rémunération', NULL, 210, 0, 170, 4, NULL, NULL, NULL, NULL, 8, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (337, 'PL01-7410', 'Déclaration CNPS', NULL, 212, 0, 170, 4, NULL, NULL, NULL, NULL, 8, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (338, 'PL01-7420', 'Prestation CNPS', NULL, 212, 0, 170, 4, NULL, NULL, NULL, NULL, 8, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (339, 'PL01-7430', 'Contrôle CNPS', NULL, 212, 0, 170, 4, NULL, NULL, NULL, NULL, 8, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (340, 'PL01-7510', 'Assurance maladie', NULL, 213, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (341, 'PL01-7520', 'Assurance vie', NULL, 213, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (342, 'PL01-7610', 'Planification formation', NULL, 214, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (343, 'PL01-7620', 'Formation', NULL, 214, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (344, 'PL01-8110', 'Gestion du parc informatique', NULL, 217, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (345, 'PL01-8120', 'Développement des applications', NULL, 217, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (346, 'PL01-8130', 'Installation des applications', NULL, 217, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (347, 'PL01-8140', 'Maintenance des applications', NULL, 217, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (348, 'PL01-8150', 'Gestion des incidents', NULL, 217, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (349, 'PL01-8210', 'Collecte et conservation des archives', NULL, 218, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (350, 'PL01-8220', 'Communication des archives', NULL, 218, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (351, 'PL01-8230', 'Élimination des archives', NULL, 218, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (352, 'PL01-8310', 'Collecte de documents', NULL, 219, 0, 170, 4, NULL, NULL, NULL, NULL, 1, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (353, 'PL01-8320', 'Description et conservation des documents', NULL, 219, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (355, 'PL01-8330', 'Communication des documents', NULL, 219, 0, 170, 4, NULL, NULL, NULL, NULL, 4, NULL, 0, 0);
INSERT INTO public.tb_classement (id, code, libelle, description, idparent, estpublie, idclassement, depth, idlistediffusion, idmodeletraitement, identite, idmodeleindexation, idconservation, idsecurite, hasdossier, hasserie) VALUES (356, 'PL01-8340', 'Désherbage des documents', NULL, 219, 0, 170, 4, NULL, NULL, NULL, NULL, 7, NULL, 0, 0);


--
-- TOC entry 3835 (class 0 OID 0)
-- Dependencies: 242
