Commit ce6d5dddfaad75ede751791b82cf5fa64d9b164f

Authored by edulucio
1 parent 295f2a97
Exists in master

Correção de bugs! By Questor

LBGenerator.tar.gz
No preview for this file type
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 : 'Trata-se de um módulo que oferece uma série de funcionalidades para 2 : 'Trata-se de um módulo que oferece uma série de funcionalidades para
3 criar um instalador usando "bash". 3 criar um instalador usando "bash".
4 4
5 -Version 1.0.0b 5 +Version 1.1.0b
6 6
7 Apache License 7 Apache License
8 Version 2.0, January 2004 8 Version 2.0, January 2004
@@ -623,6 +623,58 @@ f_get_stderr_stdout() { @@ -623,6 +623,58 @@ f_get_stderr_stdout() {
623 F_GET_STDOUT_R=$t_std 623 F_GET_STDOUT_R=$t_std
624 } 624 }
625 625
  626 +YES_NO_R=0
  627 +f_yes_no() {
  628 + : 'Questiona ao usuário "yes" ou "no" sobre determinado algo.
  629 +
  630 + Args:
  631 + QUESTION_P (str): Questionamento a ser feito.
  632 + WAIT_UNTIL_P (Optional[int]): Esperar até o intervalo informado
  633 + (em segundos). Padrão 0.
  634 + WAIT_UNTIL_RTN_P (Optional[str]): Valor a ser assumido após o intervalo
  635 + em WAIT_UNTIL_P. 1 - Yes; 0 - No. Padrão 1.
  636 +
  637 + Returns:
  638 + YES_NO_R (int): 1 - Yes; 0 - No.
  639 + '
  640 +
  641 + if [ ${EZ_I_SKIP_ON_V} -eq 1 ] ; then
  642 + return 0
  643 + fi
  644 + RESP_V=""
  645 + YES_NO_R=0
  646 + QUESTION_P=$1
  647 + WAIT_UNTIL_P=$2
  648 + WAIT_UNTIL_RTN_P=$3
  649 + if [ -z "$WAIT_UNTIL_RTN_P" ] ; then
  650 + WAIT_UNTIL_RTN_P=1
  651 + fi
  652 + if [ -z "$WAIT_UNTIL_P" ] ; then
  653 + read -e -r -p "$QUESTION_P (y/n) " RESP_V
  654 + else
  655 + if [ ${WAIT_UNTIL_RTN_P} -eq 1 ] ; then
  656 + AUT_ANSWER="y"
  657 + elif [ ${WAIT_UNTIL_RTN_P} -eq 0 ] ; then
  658 + AUT_ANSWER="n"
  659 + fi
  660 +
  661 + # NOTE: O "|| echo \"\"" serve par dar uma quebra de linha se nenhuma
  662 + # resposta foi informada! By Questor
  663 + eval "read -e -t$WAIT_UNTIL_P -r -p \"$QUESTION_P (y/n) (\"$AUT_ANSWER\" in $WAIT_UNTIL_P seconds) \" RESP_V" || echo ""
  664 +
  665 + fi
  666 + if [[ $RESP_V =~ ^([sS]|[yY])$ ]] || ( [ ${WAIT_UNTIL_RTN_P} -eq 1 ] && [ -z "$RESP_V" ] ) ; then
  667 + YES_NO_R=1
  668 + elif [[ $RESP_V =~ ^([nN])$ ]] || ( [ ${WAIT_UNTIL_RTN_P} -eq 0 ] && [ -z "$RESP_V" ] ) ; then
  669 + if [ -n "$RESP_V" ] ; then
  670 + echo "NO!"
  671 + fi
  672 + YES_NO_R=0
  673 + else
  674 + f_yes_no "$1" $2 $3
  675 + fi
  676 +}
  677 +
626 F_BAK_PATH_R="" 678 F_BAK_PATH_R=""
627 F_BAK_MD_R=0 679 F_BAK_MD_R=0
628 f_ez_mv_bak() { 680 f_ez_mv_bak() {
@@ -697,8 +749,31 @@ f_ez_mv_bak() { @@ -697,8 +749,31 @@ f_ez_mv_bak() {
697 fi 749 fi
698 } 750 }
699 751
  752 +f_okay_exit() {
  753 + : '"Printa" uma mensagem de finalização e encerra o processo.
  754 +
  755 + Args:
  756 + EXIT_CAUSE_P (Optional[str]): Causa da finalização.
  757 + '
  758 +
  759 + EZ_I_S_ON_HOLDER=$EZ_I_SKIP_ON_V
  760 + EZ_I_SKIP_ON_V=0
  761 + EXIT_CAUSE_P=$1
  762 + echo ""
  763 + f_open_section "I N F O R M A T I O N !"
  764 + EXIT_MSG_NOW_P="THE EXECUTION WAS TERMINATED!"
  765 + if [ ! -z "$EXIT_CAUSE_P" ] ; then
  766 + EXIT_MSG_NOW_P="$EXIT_MSG_NOW_P INFORMATION: \"$EXIT_CAUSE_P\""
  767 + fi
  768 + echo "$EXIT_MSG_NOW_P"
  769 + echo
  770 + f_close_section
  771 + EZ_I_SKIP_ON_V=$EZ_I_S_ON_HOLDER
  772 + exit 0
  773 +}
  774 +
700 f_error_exit() { 775 f_error_exit() {
701 - : '"Printa" uma mensagem de erro e encerra o instalador. 776 + : '"Printa" uma mensagem de erro e encerra o processo.
702 777
703 Args: 778 Args:
704 ERROR_CAUSE_P (Optional[str]): Causa do erro. 779 ERROR_CAUSE_P (Optional[str]): Causa do erro.
@@ -707,9 +782,9 @@ f_error_exit() { @@ -707,9 +782,9 @@ f_error_exit() {
707 EZ_I_S_ON_HOLDER=$EZ_I_SKIP_ON_V 782 EZ_I_S_ON_HOLDER=$EZ_I_SKIP_ON_V
708 EZ_I_SKIP_ON_V=0 783 EZ_I_SKIP_ON_V=0
709 ERROR_CAUSE_P=$1 784 ERROR_CAUSE_P=$1
710 - echo 785 + echo ""
711 f_open_section "E R R O R !" 786 f_open_section "E R R O R !"
712 - ERROR_MSG_NOW_P="AN ERROR OCCURRED AND THIS INSTALLER WAS CLOSED!" 787 + ERROR_MSG_NOW_P="AN ERROR OCCURRED AND THE EXECUTION WAS TERMINATED!"
713 if [ ! -z "$ERROR_CAUSE_P" ] ; then 788 if [ ! -z "$ERROR_CAUSE_P" ] ; then
714 ERROR_MSG_NOW_P="$ERROR_MSG_NOW_P ERROR: \"$ERROR_CAUSE_P\"" 789 ERROR_MSG_NOW_P="$ERROR_MSG_NOW_P ERROR: \"$ERROR_CAUSE_P\""
715 fi 790 fi
@@ -1277,8 +1352,9 @@ f_get_percent_from() { @@ -1277,8 +1352,9 @@ f_get_percent_from() {
1277 percentagem. 1352 percentagem.
1278 PERCENT_VAL_P (int): Valor de percentagem a ser obtido. 1353 PERCENT_VAL_P (int): Valor de percentagem a ser obtido.
1279 REM_FLOAT_POINT_P (Optional[int]): 0 - Não remove ponto flutuante; 1 - 1354 REM_FLOAT_POINT_P (Optional[int]): 0 - Não remove ponto flutuante; 1 -
1280 - remove ponto flutuante (se o valor obtido for maior ou igual a 1).  
1281 - Padrão 1. 1355 + Remove ponto flutuante (se o valor obtido for maior ou igual a 1).
  1356 + 2 - Remove ponto flutuante (se o valor obtido for maior ou igual a
  1357 + 1) e arredonda para o último dígito significativo. Padrão 1.
1282 1358
1283 Returns: 1359 Returns:
1284 F_GET_PERCENT_FROM_R (int): Porcentagem obtida. 1360 F_GET_PERCENT_FROM_R (int): Porcentagem obtida.
@@ -1296,14 +1372,24 @@ f_get_percent_from() { @@ -1296,14 +1372,24 @@ f_get_percent_from() {
1296 F_GET_PERCENT_FROM_R=$(awk '{printf("%.5f\n",($1*($2/100)))}' <<<" $VAL_GET_PERCENT_P $PERCENT_VAL_P ") 1372 F_GET_PERCENT_FROM_R=$(awk '{printf("%.5f\n",($1*($2/100)))}' <<<" $VAL_GET_PERCENT_P $PERCENT_VAL_P ")
1297 1373
1298 F_GET_PERCENT_FROM_R=${F_GET_PERCENT_FROM_R} 1374 F_GET_PERCENT_FROM_R=${F_GET_PERCENT_FROM_R}
1299 - if [ ${REM_FLOAT_POINT_P} -eq 1 ] ; then 1375 + if [ ${REM_FLOAT_POINT_P} -ge 1 ] ; then
1300 1376
1301 # NOTA: Técnica para comparar valores com ponto flutuante! By Questor 1377 # NOTA: Técnica para comparar valores com ponto flutuante! By Questor
1302 if [ $(awk '{printf($1 >= $2) ? 1 : 0}' <<<" $VAL_GET_PERCENT_P 1 ") -eq 1 ] ; then 1378 if [ $(awk '{printf($1 >= $2) ? 1 : 0}' <<<" $VAL_GET_PERCENT_P 1 ") -eq 1 ] ; then
  1379 + if [ ${REM_FLOAT_POINT_P} -eq 1 ] ; then
1303 1380
1304 - # NOTA: A estratégia abaixo foi utilizada para arredondar o valor  
1305 - # (remover o ponto flutuante)! By Questor  
1306 - F_GET_PERCENT_FROM_R=${F_GET_PERCENT_FROM_R%\.*} 1381 + # NOTA: A estratégia abaixo foi utilizada remover o ponto
  1382 + # flutuante (truncar)! By Questor
  1383 + F_GET_PERCENT_FROM_R=${F_GET_PERCENT_FROM_R%\.*}
  1384 +
  1385 + elif [ ${REM_FLOAT_POINT_P} -eq 2 ] ; then
  1386 +
  1387 + # NOTA: A estratégia abaixo foi utilizada para arredondar o
  1388 + # valor (Ex.: 10.7 -> 11, 10.5 -> 10, 10.4 -> 10...)!
  1389 + # By Questor
  1390 + F_GET_PERCENT_FROM_R=$(awk '{printf("%.0f\n", $1);}' <<<" $F_GET_PERCENT_FROM_R ")
  1391 +
  1392 + fi
1307 fi 1393 fi
1308 fi 1394 fi
1309 } 1395 }
@@ -1622,36 +1708,3 @@ f_instruct() { @@ -1622,36 +1708,3 @@ f_instruct() {
1622 } 1708 }
1623 1709
1624 # < -------------------------------------------------------------------------- 1710 # < --------------------------------------------------------------------------
1625 -  
1626 -# > --------------------------------------------------------------------------  
1627 -# ESQUEMAS CONDICIONAIS!  
1628 -# --------------------------------------  
1629 -  
1630 -YES_NO_R=0  
1631 -f_yes_no() {  
1632 - : 'Questiona ao usuário "yes" ou "no" sobre determinado algo.  
1633 -  
1634 - Args:  
1635 - QUESTION_P (str): Questionamento a ser feito.  
1636 -  
1637 - Returns:  
1638 - YES_NO_R (int): 1 - Yes; 0 - No.  
1639 - '  
1640 -  
1641 - if [ ${EZ_I_SKIP_ON_V} -eq 1 ] ; then  
1642 - return 0  
1643 - fi  
1644 - QUESTION_P=$1  
1645 - YES_NO_R=0  
1646 - read -r -p "$QUESTION_P (y/n) " RESP_V  
1647 - if [[ $RESP_V =~ ^([sS]|[yY])$ ]] ; then  
1648 - YES_NO_R=1  
1649 - elif [[ $RESP_V =~ ^([nN])$ ]] ; then  
1650 - echo "NO!"  
1651 - YES_NO_R=0  
1652 - else  
1653 - f_yes_no "$QUESTION_P"  
1654 - fi  
1655 -}  
1656 -  
1657 -# < --------------------------------------------------------------------------  
@@ -869,20 +869,20 @@ Use empty for \&quot;$LC_C_PG\&quot; (enough and recommended for LBG - LBGenerator)!&quot; 1 @@ -869,20 +869,20 @@ Use empty for \&quot;$LC_C_PG\&quot; (enough and recommended for LBG - LBGenerator)!&quot; 1
869 fi 869 fi
870 else 870 else
871 cd "$SCRIPTDIR_V" 871 cd "$SCRIPTDIR_V"
872 - cp ./lbn-basic-dt-strt/lbn_basic_dt_strt.sql /tmp 872 + cp ./lbn-basic-dt-strt/lb_basic_dt_strt.sql /tmp
873 cd /tmp 873 cd /tmp
874 - chmod 700 lbn_basic_dt_strt.sql  
875 - chown postgres lbn_basic_dt_strt.sql  
876 - chown :postgres lbn_basic_dt_strt.sql  
877 - sudo -u postgres psql $PG_DB_F -f lbn_basic_dt_strt.sql  
878 - rm -f lbn_basic_dt_strt.sql 874 + chmod 700 lb_basic_dt_strt.sql
  875 + chown postgres lb_basic_dt_strt.sql
  876 + chown :postgres lb_basic_dt_strt.sql
  877 + sudo -u postgres psql $PG_DB_F -f lb_basic_dt_strt.sql
  878 + rm -f lb_basic_dt_strt.sql
879 fi 879 fi
880 else 880 else
881 f_error_exit 881 f_error_exit
882 fi 882 fi
883 CREATE_LB_DT=1 883 CREATE_LB_DT=1
884 else 884 else
885 - f_enter_to_cont "The file \"./lbn-basic-dt-strt/lbn_basic_dt_strt.sql\" has the basic LBG - LBGenerator data structures! Check it!" 885 + f_enter_to_cont "The file \"./lbn-basic-dt-strt/lb_basic_dt_strt.sql\" has the basic LBG - LBGenerator data structures! Check it!"
886 fi 886 fi
887 f_close_section 887 f_close_section
888 888
@@ -2096,11 +2096,21 @@ Use empty for \&quot;$LBI_LBINDEX_URL\&quot;!&quot; @@ -2096,11 +2096,21 @@ Use empty for \&quot;$LBI_LBINDEX_URL\&quot;!&quot;
2096 if [ -n "$GET_USR_INPUT_R" ] ; then 2096 if [ -n "$GET_USR_INPUT_R" ] ; then
2097 LBI_LBINDEX_URL=$GET_USR_INPUT_R 2097 LBI_LBINDEX_URL=$GET_USR_INPUT_R
2098 fi 2098 fi
  2099 + ES_ESDEF_URL="http://127.0.0.1:9200"
  2100 + QUESTION_F="Enter the ES - ElasticSearch http service URL (don't use \"/\" at the end).
  2101 +Use empty for \"$ES_ESDEF_URL\"!"
  2102 + f_div_section
  2103 + f_get_usr_input "$QUESTION_F" 1
  2104 + QUESTION_F=""
  2105 + if [ -n "$GET_USR_INPUT_R" ] ; then
  2106 + ES_ESDEF_URL=$GET_USR_INPUT_R
  2107 + fi
2099 if [[ "$HTTP_SRV_WSGI" == "u" ]] ; then 2108 if [[ "$HTTP_SRV_WSGI" == "u" ]] ; then
2100 eval "cp -f \"$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini.uwsgi-dist\" \"$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini\"" 2109 eval "cp -f \"$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini.uwsgi-dist\" \"$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini\""
2101 f_ez_sed "<SQLA_POOL_SIZE>" "$SQLA_POOL_SIZE" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1 2110 f_ez_sed "<SQLA_POOL_SIZE>" "$SQLA_POOL_SIZE" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1
2102 f_ez_sed "<SQLA_POOL_SIZE_MAX_OVERFLOW>" "$SQLA_POOL_SIZE" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1 2111 f_ez_sed "<SQLA_POOL_SIZE_MAX_OVERFLOW>" "$SQLA_POOL_SIZE" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1
2103 f_ez_sed "<LBI_LBINDEX_URL>" "$LBI_LBINDEX_URL" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 2112 f_ez_sed "<LBI_LBINDEX_URL>" "$LBI_LBINDEX_URL" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini"
  2113 + f_ez_sed "<ES_ESDEF_URL>" "$ES_ESDEF_URL" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini"
2104 f_ez_sed "<SQLA_URL>" "$PG_CFG_F" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1 2114 f_ez_sed "<SQLA_URL>" "$PG_CFG_F" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1
2105 f_ez_sed "<VE32_PATH>" "$BASE_INST_DIR_V/ve32" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1 2115 f_ez_sed "<VE32_PATH>" "$BASE_INST_DIR_V/ve32" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1
2106 f_ez_sed "<APP_ROOT_F>" "$APP_ROOT_F" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 2116 f_ez_sed "<APP_ROOT_F>" "$APP_ROOT_F" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini"
@@ -2123,7 +2133,7 @@ Use empty for \&quot;$LBI_LBINDEX_URL\&quot;!&quot; @@ -2123,7 +2133,7 @@ Use empty for \&quot;$LBI_LBINDEX_URL\&quot;!&quot;
2123 # NOTE: Calcula um valor de timeout conforme a quantidade de 2133 # NOTE: Calcula um valor de timeout conforme a quantidade de
2124 # memória RAM! By Questor 2134 # memória RAM! By Questor
2125 f_div_section 2135 f_div_section
2126 - f_get_usr_input "Enter the HTTP REQUEST TIMEOUT (numbers only, integers only). 2136 + f_get_usr_input "Enter the HTTP REQUEST TIMEOUT in seconds (numbers only, integers only).
2127 Use empty for \"$REQ_TIMEOUT\"$TOO_LOW_REQ_TIMEOUT 2137 Use empty for \"$REQ_TIMEOUT\"$TOO_LOW_REQ_TIMEOUT
2128 * Use a numeric value equivalent at most 44% of your server RAM in MB; 2138 * Use a numeric value equivalent at most 44% of your server RAM in MB;
2129 * Decrease the value if you have other applications using your server; 2139 * Decrease the value if you have other applications using your server;
@@ -2180,6 +2190,7 @@ Use empty for \&quot;$REQ_TIMEOUT\&quot;$TOO_LOW_REQ_TIMEOUT @@ -2180,6 +2190,7 @@ Use empty for \&quot;$REQ_TIMEOUT\&quot;$TOO_LOW_REQ_TIMEOUT
2180 f_ez_sed "<SQLA_POOL_SIZE>" "$SQLA_POOL_SIZE" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1 2190 f_ez_sed "<SQLA_POOL_SIZE>" "$SQLA_POOL_SIZE" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1
2181 f_ez_sed "<SQLA_POOL_SIZE_MAX_OVERFLOW>" "$SQLA_POOL_SIZE" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1 2191 f_ez_sed "<SQLA_POOL_SIZE_MAX_OVERFLOW>" "$SQLA_POOL_SIZE" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1
2182 f_ez_sed "<LBI_LBINDEX_URL>" "$LBI_LBINDEX_URL" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 2192 f_ez_sed "<LBI_LBINDEX_URL>" "$LBI_LBINDEX_URL" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini"
  2193 + f_ez_sed "<ES_ESDEF_URL>" "$ES_ESDEF_URL" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini"
2183 f_ez_sed "<SQLA_URL>" "$PG_CFG_F" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1 2194 f_ez_sed "<SQLA_URL>" "$PG_CFG_F" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1
2184 f_ez_sed "<APP_ROOT_F>" "$APP_ROOT_F" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1 2195 f_ez_sed "<APP_ROOT_F>" "$APP_ROOT_F" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1
2185 f_chk_by_path_hlp "$NGINX_CONF_PATH/lbg.conf" "f" "\"lbg.conf\" already created in \"$NGINX_CONF_PATH/lbg.conf\"!" 2196 f_chk_by_path_hlp "$NGINX_CONF_PATH/lbg.conf" "f" "\"lbg.conf\" already created in \"$NGINX_CONF_PATH/lbg.conf\"!"
@@ -2213,6 +2224,7 @@ Use empty for \&quot;$REQ_TIMEOUT\&quot;$TOO_LOW_REQ_TIMEOUT @@ -2213,6 +2224,7 @@ Use empty for \&quot;$REQ_TIMEOUT\&quot;$TOO_LOW_REQ_TIMEOUT
2213 f_ez_sed "<SQLA_POOL_SIZE>" "$SQLA_POOL_SIZE" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1 2224 f_ez_sed "<SQLA_POOL_SIZE>" "$SQLA_POOL_SIZE" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1
2214 f_ez_sed "<SQLA_POOL_SIZE_MAX_OVERFLOW>" "$SQLA_POOL_SIZE" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1 2225 f_ez_sed "<SQLA_POOL_SIZE_MAX_OVERFLOW>" "$SQLA_POOL_SIZE" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1
2215 f_ez_sed "<LBI_LBINDEX_URL>" "$LBI_LBINDEX_URL" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 2226 f_ez_sed "<LBI_LBINDEX_URL>" "$LBI_LBINDEX_URL" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini"
  2227 + f_ez_sed "<ES_ESDEF_URL>" "$ES_ESDEF_URL" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini"
2216 f_ez_sed "<SQLA_URL>" "$PG_CFG_F" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1 2228 f_ez_sed "<SQLA_URL>" "$PG_CFG_F" "$BASE_INST_DIR_V/ve32/src/LBGenerator/production.ini" 1
2217 f_chk_by_path_hlp "$HTTPD_CONF_PATH/lbg.conf" "f" "\"lbg.conf\" already created in \"$HTTPD_CONF_PATH/lbg.conf\"!" 2229 f_chk_by_path_hlp "$HTTPD_CONF_PATH/lbg.conf" "f" "\"lbg.conf\" already created in \"$HTTPD_CONF_PATH/lbg.conf\"!"
2218 F_BAK_MD_R=1 2230 F_BAK_MD_R=1
lbn-basic-dt-strt/lb_basic_dt_strt.sql 0 → 100755
@@ -0,0 +1,997 @@ @@ -0,0 +1,997 @@
  1 +--
  2 +-- PostgreSQL database dump
  3 +--
  4 +
  5 +SET statement_timeout = 0;
  6 +SET lock_timeout = 0;
  7 +SET client_encoding = 'UTF8';
  8 +SET standard_conforming_strings = on;
  9 +SET check_function_bodies = false;
  10 +SET client_min_messages = warning;
  11 +
  12 +--
  13 +-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
  14 +--
  15 +
  16 +CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
  17 +
  18 +
  19 +--
  20 +-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
  21 +--
  22 +
  23 +COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
  24 +
  25 +
  26 +SET search_path = public, pg_catalog;
  27 +
  28 +SET default_tablespace = '';
  29 +
  30 +SET default_with_oids = false;
  31 +
  32 +--
  33 +-- Name: alembic_version; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  34 +--
  35 +
  36 +CREATE TABLE alembic_version (
  37 + version_num character varying(32) NOT NULL
  38 +);
  39 +
  40 +
  41 +ALTER TABLE alembic_version OWNER TO postgres;
  42 +
  43 +--
  44 +-- Name: lb_base; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  45 +--
  46 +
  47 +CREATE TABLE lb_base (
  48 + id_base integer NOT NULL,
  49 + name character varying NOT NULL,
  50 + struct character varying NOT NULL,
  51 + dt_base timestamp without time zone NOT NULL,
  52 + idx_exp boolean NOT NULL,
  53 + idx_exp_url character varying,
  54 + idx_exp_time integer,
  55 + file_ext boolean NOT NULL,
  56 + file_ext_time integer,
  57 + txt_mapping character varying
  58 +);
  59 +
  60 +
  61 +ALTER TABLE lb_base OWNER TO postgres;
  62 +
  63 +--
  64 +-- Name: lb_base_id_base_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  65 +--
  66 +
  67 +CREATE SEQUENCE lb_base_id_base_seq
  68 + START WITH 1
  69 + INCREMENT BY 1
  70 + NO MINVALUE
  71 + NO MAXVALUE
  72 + CACHE 1;
  73 +
  74 +
  75 +ALTER TABLE lb_base_id_base_seq OWNER TO postgres;
  76 +
  77 +--
  78 +-- Name: lb_base_id_base_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  79 +--
  80 +
  81 +ALTER SEQUENCE lb_base_id_base_seq OWNED BY lb_base.id_base;
  82 +
  83 +
  84 +--
  85 +-- Name: lb_doc__form; Type: TABLE; Schema: public; Owner: lbu; Tablespace:
  86 +--
  87 +
  88 +CREATE TABLE lb_doc__form (
  89 + id_doc integer NOT NULL,
  90 + document json NOT NULL,
  91 + dt_doc timestamp without time zone NOT NULL,
  92 + dt_last_up timestamp without time zone NOT NULL,
  93 + dt_del timestamp without time zone,
  94 + dt_idx timestamp without time zone
  95 +);
  96 +
  97 +
  98 +ALTER TABLE lb_doc__form OWNER TO lbu;
  99 +
  100 +--
  101 +-- Name: lb_doc__form_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: lbu
  102 +--
  103 +
  104 +CREATE SEQUENCE lb_doc__form_id_doc_seq
  105 + START WITH 1
  106 + INCREMENT BY 1
  107 + NO MINVALUE
  108 + NO MAXVALUE
  109 + CACHE 1;
  110 +
  111 +
  112 +ALTER TABLE lb_doc__form_id_doc_seq OWNER TO lbu;
  113 +
  114 +--
  115 +-- Name: lb_doc__history; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  116 +--
  117 +
  118 +CREATE TABLE lb_doc__history (
  119 + id_doc integer NOT NULL,
  120 + document json NOT NULL,
  121 + dt_doc timestamp without time zone NOT NULL,
  122 + dt_last_up timestamp without time zone NOT NULL,
  123 + dt_del timestamp without time zone,
  124 + dt_idx timestamp without time zone
  125 +);
  126 +
  127 +
  128 +ALTER TABLE lb_doc__history OWNER TO postgres;
  129 +
  130 +--
  131 +-- Name: lb_doc__history_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  132 +--
  133 +
  134 +CREATE SEQUENCE lb_doc__history_id_doc_seq
  135 + START WITH 1
  136 + INCREMENT BY 1
  137 + NO MINVALUE
  138 + NO MAXVALUE
  139 + CACHE 1;
  140 +
  141 +
  142 +ALTER TABLE lb_doc__history_id_doc_seq OWNER TO postgres;
  143 +
  144 +--
  145 +-- Name: lb_doc__report; Type: TABLE; Schema: public; Owner: lbu; Tablespace:
  146 +--
  147 +
  148 +CREATE TABLE lb_doc__report (
  149 + id_doc integer NOT NULL,
  150 + document json NOT NULL,
  151 + dt_doc timestamp without time zone NOT NULL,
  152 + dt_last_up timestamp without time zone NOT NULL,
  153 + dt_del timestamp without time zone,
  154 + dt_idx timestamp without time zone
  155 +);
  156 +
  157 +
  158 +ALTER TABLE lb_doc__report OWNER TO lbu;
  159 +
  160 +--
  161 +-- Name: lb_doc__report_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: lbu
  162 +--
  163 +
  164 +CREATE SEQUENCE lb_doc__report_id_doc_seq
  165 + START WITH 1
  166 + INCREMENT BY 1
  167 + NO MINVALUE
  168 + NO MAXVALUE
  169 + CACHE 1;
  170 +
  171 +
  172 +ALTER TABLE lb_doc__report_id_doc_seq OWNER TO lbu;
  173 +
  174 +--
  175 +-- Name: lb_doc__search; Type: TABLE; Schema: public; Owner: lbu; Tablespace:
  176 +--
  177 +
  178 +CREATE TABLE lb_doc__search (
  179 + id_doc integer NOT NULL,
  180 + document json NOT NULL,
  181 + dt_doc timestamp without time zone NOT NULL,
  182 + dt_last_up timestamp without time zone NOT NULL,
  183 + dt_del timestamp without time zone,
  184 + dt_idx timestamp without time zone
  185 +);
  186 +
  187 +
  188 +ALTER TABLE lb_doc__search OWNER TO lbu;
  189 +
  190 +--
  191 +-- Name: lb_doc__search_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: lbu
  192 +--
  193 +
  194 +CREATE SEQUENCE lb_doc__search_id_doc_seq
  195 + START WITH 1
  196 + INCREMENT BY 1
  197 + NO MINVALUE
  198 + NO MAXVALUE
  199 + CACHE 1;
  200 +
  201 +
  202 +ALTER TABLE lb_doc__search_id_doc_seq OWNER TO lbu;
  203 +
  204 +--
  205 +-- Name: lb_doc__user; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  206 +--
  207 +
  208 +CREATE TABLE lb_doc__user (
  209 + id_doc integer NOT NULL,
  210 + document json NOT NULL,
  211 + dt_doc timestamp without time zone NOT NULL,
  212 + dt_last_up timestamp without time zone NOT NULL,
  213 + dt_del timestamp without time zone,
  214 + dt_idx timestamp without time zone,
  215 + name_base character varying[],
  216 + id_user integer,
  217 + status_user boolean,
  218 + access_type character varying[],
  219 + name_user character varying,
  220 + creation_date_user date,
  221 + email_user character varying,
  222 + passwd_user character varying
  223 +);
  224 +
  225 +
  226 +ALTER TABLE lb_doc__user OWNER TO postgres;
  227 +
  228 +--
  229 +-- Name: lb_doc__user_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  230 +--
  231 +
  232 +CREATE SEQUENCE lb_doc__user_id_doc_seq
  233 + START WITH 1
  234 + INCREMENT BY 1
  235 + NO MINVALUE
  236 + NO MAXVALUE
  237 + CACHE 1;
  238 +
  239 +
  240 +ALTER TABLE lb_doc__user_id_doc_seq OWNER TO postgres;
  241 +
  242 +--
  243 +-- Name: lb_doc_app_user; Type: TABLE; Schema: public; Owner: lbu; Tablespace:
  244 +--
  245 +
  246 +CREATE TABLE lb_doc_app_user (
  247 + id_doc integer NOT NULL,
  248 + document json NOT NULL,
  249 + dt_doc timestamp without time zone NOT NULL,
  250 + dt_last_up timestamp without time zone NOT NULL,
  251 + dt_del timestamp without time zone,
  252 + dt_idx timestamp without time zone,
  253 + id_user character varying,
  254 + status_user boolean,
  255 + name_user character varying,
  256 + creation_date_user date,
  257 + email_user character varying,
  258 + passwd_user character varying
  259 +);
  260 +
  261 +
  262 +ALTER TABLE lb_doc_app_user OWNER TO lbu;
  263 +
  264 +--
  265 +-- Name: lb_doc_app_user_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: lbu
  266 +--
  267 +
  268 +CREATE SEQUENCE lb_doc_app_user_id_doc_seq
  269 + START WITH 1
  270 + INCREMENT BY 1
  271 + NO MINVALUE
  272 + NO MAXVALUE
  273 + CACHE 1;
  274 +
  275 +
  276 +ALTER TABLE lb_doc_app_user_id_doc_seq OWNER TO lbu;
  277 +
  278 +--
  279 +-- Name: lb_doc_log_lbconverter; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  280 +--
  281 +
  282 +CREATE TABLE lb_doc_log_lbconverter (
  283 + id_doc integer NOT NULL,
  284 + document json NOT NULL,
  285 + dt_doc timestamp without time zone NOT NULL,
  286 + dt_last_up timestamp without time zone NOT NULL,
  287 + dt_del timestamp without time zone,
  288 + dt_idx timestamp without time zone,
  289 + file_name character varying,
  290 + id_doc_orig integer,
  291 + nm_base character varying,
  292 + dt_error timestamp without time zone
  293 +);
  294 +
  295 +
  296 +ALTER TABLE lb_doc_log_lbconverter OWNER TO postgres;
  297 +
  298 +--
  299 +-- Name: lb_doc_log_lbconverter_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  300 +--
  301 +
  302 +CREATE SEQUENCE lb_doc_log_lbconverter_id_doc_seq
  303 + START WITH 1
  304 + INCREMENT BY 1
  305 + NO MINVALUE
  306 + NO MAXVALUE
  307 + CACHE 1;
  308 +
  309 +
  310 +ALTER TABLE lb_doc_log_lbconverter_id_doc_seq OWNER TO postgres;
  311 +
  312 +--
  313 +-- Name: lb_doc_log_lbindex; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  314 +--
  315 +
  316 +CREATE TABLE lb_doc_log_lbindex (
  317 + id_doc integer NOT NULL,
  318 + document json NOT NULL,
  319 + dt_doc timestamp without time zone NOT NULL,
  320 + dt_last_up timestamp without time zone NOT NULL,
  321 + dt_del timestamp without time zone,
  322 + dt_idx timestamp without time zone,
  323 + id_doc_orig integer,
  324 + dt_last_up_orig timestamp without time zone,
  325 + nm_base character varying,
  326 + dt_error timestamp without time zone
  327 +);
  328 +
  329 +
  330 +ALTER TABLE lb_doc_log_lbindex OWNER TO postgres;
  331 +
  332 +--
  333 +-- Name: lb_doc_log_lbindex_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  334 +--
  335 +
  336 +CREATE SEQUENCE lb_doc_log_lbindex_id_doc_seq
  337 + START WITH 1
  338 + INCREMENT BY 1
  339 + NO MINVALUE
  340 + NO MAXVALUE
  341 + CACHE 1;
  342 +
  343 +
  344 +ALTER TABLE lb_doc_log_lbindex_id_doc_seq OWNER TO postgres;
  345 +
  346 +--
  347 +-- Name: lb_file__form; Type: TABLE; Schema: public; Owner: lbu; Tablespace:
  348 +--
  349 +
  350 +CREATE TABLE lb_file__form (
  351 + id_file uuid NOT NULL,
  352 + id_doc integer,
  353 + filename character varying NOT NULL,
  354 + file bytea NOT NULL,
  355 + mimetype character varying NOT NULL,
  356 + filesize integer NOT NULL,
  357 + filetext character varying,
  358 + dt_ext_text timestamp without time zone
  359 +);
  360 +
  361 +
  362 +ALTER TABLE lb_file__form OWNER TO lbu;
  363 +
  364 +--
  365 +-- Name: lb_file__history; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  366 +--
  367 +
  368 +CREATE TABLE lb_file__history (
  369 + id_file integer NOT NULL,
  370 + id_doc integer NOT NULL,
  371 + filename character varying NOT NULL,
  372 + file bytea NOT NULL,
  373 + mimetype character varying NOT NULL,
  374 + filesize integer NOT NULL,
  375 + filetext character varying,
  376 + dt_ext_text timestamp without time zone
  377 +);
  378 +
  379 +
  380 +ALTER TABLE lb_file__history OWNER TO postgres;
  381 +
  382 +--
  383 +-- Name: lb_file__report; Type: TABLE; Schema: public; Owner: lbu; Tablespace:
  384 +--
  385 +
  386 +CREATE TABLE lb_file__report (
  387 + id_file uuid NOT NULL,
  388 + id_doc integer,
  389 + filename character varying NOT NULL,
  390 + file bytea NOT NULL,
  391 + mimetype character varying NOT NULL,
  392 + filesize integer NOT NULL,
  393 + filetext character varying,
  394 + dt_ext_text timestamp without time zone
  395 +);
  396 +
  397 +
  398 +ALTER TABLE lb_file__report OWNER TO lbu;
  399 +
  400 +--
  401 +-- Name: lb_file__search; Type: TABLE; Schema: public; Owner: lbu; Tablespace:
  402 +--
  403 +
  404 +CREATE TABLE lb_file__search (
  405 + id_file uuid NOT NULL,
  406 + id_doc integer,
  407 + filename character varying NOT NULL,
  408 + file bytea NOT NULL,
  409 + mimetype character varying NOT NULL,
  410 + filesize integer NOT NULL,
  411 + filetext character varying,
  412 + dt_ext_text timestamp without time zone
  413 +);
  414 +
  415 +
  416 +ALTER TABLE lb_file__search OWNER TO lbu;
  417 +
  418 +--
  419 +-- Name: lb_file__user; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  420 +--
  421 +
  422 +CREATE TABLE lb_file__user (
  423 + id_file integer NOT NULL,
  424 + id_doc integer NOT NULL,
  425 + filename character varying NOT NULL,
  426 + file bytea NOT NULL,
  427 + mimetype character varying NOT NULL,
  428 + filesize integer NOT NULL,
  429 + filetext character varying,
  430 + dt_ext_text timestamp without time zone
  431 +);
  432 +
  433 +
  434 +ALTER TABLE lb_file__user OWNER TO postgres;
  435 +
  436 +--
  437 +-- Name: lb_file_app_user; Type: TABLE; Schema: public; Owner: lbu; Tablespace:
  438 +--
  439 +
  440 +CREATE TABLE lb_file_app_user (
  441 + id_file uuid NOT NULL,
  442 + id_doc integer,
  443 + filename character varying NOT NULL,
  444 + file bytea NOT NULL,
  445 + mimetype character varying NOT NULL,
  446 + filesize integer NOT NULL,
  447 + filetext character varying,
  448 + dt_ext_text timestamp without time zone
  449 +);
  450 +
  451 +
  452 +ALTER TABLE lb_file_app_user OWNER TO lbu;
  453 +
  454 +--
  455 +-- Name: lb_file_log_lbconverter; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  456 +--
  457 +
  458 +CREATE TABLE lb_file_log_lbconverter (
  459 + id_file uuid NOT NULL,
  460 + id_doc integer,
  461 + filename character varying NOT NULL,
  462 + file bytea NOT NULL,
  463 + mimetype character varying NOT NULL,
  464 + filesize integer NOT NULL,
  465 + filetext character varying,
  466 + dt_ext_text timestamp without time zone
  467 +);
  468 +
  469 +
  470 +ALTER TABLE lb_file_log_lbconverter OWNER TO postgres;
  471 +
  472 +--
  473 +-- Name: lb_file_log_lbindex; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  474 +--
  475 +
  476 +CREATE TABLE lb_file_log_lbindex (
  477 + id_file integer NOT NULL,
  478 + id_doc integer NOT NULL,
  479 + filename character varying NOT NULL,
  480 + file bytea NOT NULL,
  481 + mimetype character varying NOT NULL,
  482 + filesize integer NOT NULL,
  483 + filetext character varying,
  484 + dt_ext_text timestamp without time zone
  485 +);
  486 +
  487 +
  488 +ALTER TABLE lb_file_log_lbindex OWNER TO postgres;
  489 +
  490 +--
  491 +-- Name: lb_index_error; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  492 +--
  493 +
  494 +CREATE TABLE lb_index_error (
  495 + id_error integer NOT NULL,
  496 + base character varying NOT NULL,
  497 + id_doc integer NOT NULL,
  498 + dt_error timestamp without time zone NOT NULL,
  499 + msg_error character varying
  500 +);
  501 +
  502 +
  503 +ALTER TABLE lb_index_error OWNER TO postgres;
  504 +
  505 +--
  506 +-- Name: lb_index_error_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  507 +--
  508 +
  509 +CREATE SEQUENCE lb_index_error_seq
  510 + START WITH 1
  511 + INCREMENT BY 1
  512 + NO MINVALUE
  513 + NO MAXVALUE
  514 + CACHE 1;
  515 +
  516 +
  517 +ALTER TABLE lb_index_error_seq OWNER TO postgres;
  518 +
  519 +--
  520 +-- Name: lb_txt_idx; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
  521 +--
  522 +
  523 +CREATE TABLE lb_txt_idx (
  524 + id_idx integer NOT NULL,
  525 + nm_idx character varying NOT NULL,
  526 + cfg_idx character varying NOT NULL,
  527 + dt_crt_idx timestamp without time zone NOT NULL,
  528 + dt_upt_idx timestamp without time zone NOT NULL,
  529 + url_idx character varying NOT NULL,
  530 + actv_idx boolean NOT NULL,
  531 + struct character varying NOT NULL
  532 +);
  533 +
  534 +
  535 +ALTER TABLE lb_txt_idx OWNER TO postgres;
  536 +
  537 +--
  538 +-- Name: lb_txt_idx_id_idx_seq; Type: SEQUENCE; Schema: public; Owner: postgres
  539 +--
  540 +
  541 +CREATE SEQUENCE lb_txt_idx_id_idx_seq
  542 + START WITH 1
  543 + INCREMENT BY 1
  544 + NO MINVALUE
  545 + NO MAXVALUE
  546 + CACHE 1;
  547 +
  548 +
  549 +ALTER TABLE lb_txt_idx_id_idx_seq OWNER TO postgres;
  550 +
  551 +--
  552 +-- Name: lb_txt_idx_id_idx_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
  553 +--
  554 +
  555 +ALTER SEQUENCE lb_txt_idx_id_idx_seq OWNED BY lb_txt_idx.id_idx;
  556 +
  557 +
  558 +--
  559 +-- Name: id_base; Type: DEFAULT; Schema: public; Owner: postgres
  560 +--
  561 +
  562 +ALTER TABLE ONLY lb_base ALTER COLUMN id_base SET DEFAULT nextval('lb_base_id_base_seq'::regclass);
  563 +
  564 +
  565 +--
  566 +-- Name: id_idx; Type: DEFAULT; Schema: public; Owner: postgres
  567 +--
  568 +
  569 +ALTER TABLE ONLY lb_txt_idx ALTER COLUMN id_idx SET DEFAULT nextval('lb_txt_idx_id_idx_seq'::regclass);
  570 +
  571 +
  572 +--
  573 +-- Data for Name: alembic_version; Type: TABLE DATA; Schema: public; Owner: postgres
  574 +--
  575 +
  576 +COPY alembic_version (version_num) FROM stdin;
  577 +\.
  578 +
  579 +
  580 +--
  581 +-- Data for Name: lb_base; Type: TABLE DATA; Schema: public; Owner: postgres
  582 +--
  583 +
  584 +COPY lb_base (id_base, name, struct, dt_base, idx_exp, idx_exp_url, idx_exp_time, file_ext, file_ext_time, txt_mapping) FROM stdin;
  585 +4 _user {"content":[{"field":{"alias":"id","description":"LightBase's uses ID","name":"id_user","datatype":"Integer","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"name","description":"User's name","name":"name_user","datatype":"Text","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"email","description":"User's mail","name":"email_user","datatype":"Text","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"passwd","description":"User's password","name":"passwd_user","datatype":"Text","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"group":{"content":[{"field":{"alias":"name_base","description":"Name of the base the user can access","name":"name_base","datatype":"Text","indices":["Textual","Ordenado","Fuzzy"],"required":false,"multivalued":false}},{"field":{"alias":"access_type","description":"Type of access the user has","name":"access_type","datatype":"Text","indices":["Textual","Ordenado"],"required":false,"multivalued":false}}],"metadata":{"alias":"bases","description":"List of bases that the user can access and what kind of access it is","multivalued":true,"name":"bases_user"}}},{"field":{"alias":"creation_date","description":"Date the user account was created","name":"creation_date_user","datatype":"Date","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"status","description":"Check if the user is activer or not","name":"status_user","datatype":"Boolean","indices":["Textual","Ordenado"],"required":true,"multivalued":false}}],"metadata":{"color":"#000000","description":"LightBase's Users Meta Base.","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":4,"name":"_user","password":"","model":{"creation_date_user":"Date","email_user":"Text","id_user":"Integer","name_user":"Text","passwd_user":"Text","status_user":"Boolean","bases_user":[{"access_type":"Text","name_base":"Text"}]}}} 2017-01-01 00:00:00 f 0 f 0
  586 +5 app_user {"content":[{"field":{"name":"id_user","datatype":"Text","required":true,"alias":"id_user","multivalued":false,"indices":["Textual","Ordenado"],"description":"LightBase's uses ID"}},{"field":{"name":"name_user","datatype":"Text","required":true,"alias":"name","multivalued":false,"indices":["Textual","Ordenado"],"description":"User's name"}},{"field":{"name":"email_user","datatype":"Text","required":true,"alias":"email","multivalued":false,"indices":["Textual","Ordenado"],"description":"User's mail"}},{"field":{"name":"passwd_user","datatype":"Text","required":true,"alias":"passwd","multivalued":false,"indices":["Textual","Ordenado"],"description":"User's password"}},{"field":{"name":"bases","datatype":"Integer","required":false,"alias":"bases","multivalued":true,"indices":["Textual"],"description":"Id doc list the base the user is owner"}},{"field":{"name":"forms","datatype":"Integer","required":false,"alias":"forms","multivalued":true,"indices":["Textual"],"description":"Id doc list of the form where user can access"}},{"field":{"name":"reports","datatype":"Text","required":false,"alias":"reports","multivalued":true,"indices":["Textual"],"description":"Id doc list of the report where user can access"}},{"group":{"content":[{"field":{"name":"id","datatype":"Integer","required":true,"alias":"id","multivalued":false,"indices":["Textual"],"description":"Id doc of element"}},{"field":{"name":"type","datatype":"Text","required":true,"alias":"type","multivalued":false,"indices":["Textual"],"description":"Types allowed form, base and report"}}],"metadata":{"multivalued":true,"alias":"shortcuts","name":"shortcuts","description":"List of shortcuts of user"}}},{"field":{"name":"creation_date_user","datatype":"Date","required":true,"alias":"creation_date","multivalued":false,"indices":["Textual","Ordenado"],"description":"Date the user account was created"}},{"field":{"name":"status_user","datatype":"Boolean","required":true,"alias":"status","multivalued":false,"indices":["Textual","Ordenado"],"description":"Check if the user is activer or not"}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase's Users Meta Base.","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":5,"name":"app_user","owner":"","password":"","txt_mapping":"","model":{"bases":["Integer"],"creation_date_user":"Date","email_user":"Text","forms":["Integer"],"id_user":"Text","name_user":"Text","passwd_user":"Text","reports":["Text"],"status_user":"Boolean","shortcuts":[{"id":"Integer","type":"Text"}]}}} 2017-01-01 00:00:00 f 0 f 0
  587 +2 _history {"content":[{"field":{"alias":"id_base","description":"Base old ID.","name":"id_base","datatype":"Integer","indices":["Textual"],"required":true,"multivalued":false}},{"field":{"alias":"author","description":"Event Author.","name":"author","datatype":"Text","indices":["Textual"],"required":true,"multivalued":false}},{"field":{"alias":"date","description":"Event Date.","name":"date","datatype":"DateTime","indices":["Textual"],"required":true,"multivalued":false}},{"field":{"alias":"name","description":"Base old name.","name":"name","datatype":"Text","indices":["Textual"],"required":true,"multivalued":false}},{"field":{"alias":"structure","description":"Base old structure","name":"structure","datatype":"Json","indices":["Textual"],"required":true,"multivalued":false}},{"field":{"alias":"status","description":"Base status","name":"status","datatype":"Text","indices":["Textual"],"required":true,"multivalued":false}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase - History Meta Base.","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":2,"name":"_history","owner":"","password":"","txt_mapping":"","model":{"author":"Text","date":"DateTime","id_base":"Integer","name":"Text","status":"Text","structure":"Json"}}} 2017-01-01 00:00:00 f 0 f 0
  588 +1 _form {"content":[{"field":{"name":"id_base","datatype":"Integer","required":true,"alias":"id_base","multivalued":false,"indices":["Textual"],"description":"Base ID."}},{"field":{"name":"author","datatype":"Text","required":true,"alias":"author","multivalued":false,"indices":["Textual"],"description":"Event Author."}},{"field":{"name":"name","datatype":"Text","required":true,"alias":"name","multivalued":false,"indices":["Textual"],"description":"Form name."}},{"field":{"name":"description","datatype":"Text","required":true,"alias":"description","multivalued":false,"indices":["Textual"],"description":"Form description."}},{"field":{"name":"structure","datatype":"Json","required":true,"alias":"structure","multivalued":false,"indices":["Textual"],"description":"Form structure"}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase's Form Meta Base.","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":1,"name":"_form","owner":"","password":"","txt_mapping":"","model":{"author":"Text","description":"Text","id_base":"Integer","name":"Text","structure":"Json"}}} 2017-01-01 00:00:00 f 0 f 0
  589 +3 _report {"content":[{"field":{"name":"id_base","datatype":"Integer","required":true,"alias":"id_base","multivalued":false,"indices":["Textual"],"description":"Base ID."}},{"field":{"name":"author","datatype":"Text","required":true,"alias":"author","multivalued":false,"indices":["Textual"],"description":"Event Author."}},{"field":{"name":"name","datatype":"Text","required":true,"alias":"name","multivalued":false,"indices":["Textual"],"description":"Report name."}},{"field":{"name":"description","datatype":"Text","required":true,"alias":"description","multivalued":false,"indices":["Textual"],"description":"Report description."}},{"field":{"name":"structure","datatype":"Json","required":true,"alias":"structure","multivalued":false,"indices":["Textual"],"description":"Report structure"}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase's Report Meta Base.","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":3,"name":"_report","owner":"","password":"","txt_mapping":"","model":{"author":"Text","description":"Text","id_base":"Integer","name":"Text","structure":"Json"}}} 2017-01-01 00:00:00 f 0 f 0
  590 +7 log_lbindex {"content":[{"field":{"alias":"Nome da base","description":"Nome da base","name":"nm_base","datatype":"Text","indices":["Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"identificador do documento","description":"id do documento que originou o erro.","name":"id_doc_orig","datatype":"Integer","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"Mensagem de erro","description":"Mensagem de erro","name":"error_msg","datatype":"Text","indices":["Nenhum"],"required":true,"multivalued":false}},{"field":{"alias":"Data do erro","description":"Data e Hora no formato DD/MM/AAAA - HH:MM:SS do erro","name":"dt_error","datatype":"DateTime","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"dt_last_up_orig","description":"Data e Hora no formato DD/MM/AAAA - HH:MM:SS da última atualização do registro que originou o erro.","name":"dt_last_up_orig","datatype":"DateTime","indices":["Textual","Ordenado"],"required":true,"multivalued":false}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase - Log de erros do LBIndex","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":7,"name":"log_lbindex","owner":"","password":"","model":{"dt_error":"DateTime","dt_last_up_orig":"DateTime","error_msg":"Text","id_doc_orig":"Integer","nm_base":"Text"}}} 2017-01-01 00:00:00 f 0 f 0
  591 +6 log_lbconverter {"content":[{"field":{"name":"nm_base","datatype":"Text","required":true,"alias":"Nome da base","multivalued":false,"indices":["Ordenado"],"description":"Nome da base"}},{"field":{"name":"id_doc_orig","datatype":"Integer","required":true,"alias":"id_doc_orig","multivalued":false,"indices":["Textual","Ordenado"],"description":"id do documento que originou o erro."}},{"field":{"name":"id_file_orig","datatype":"Text","required":true,"alias":"id_file_orig","multivalued":false,"indices":["Textual"],"description":"ID do arquivo que originou o erro."}},{"field":{"name":"file_name","datatype":"Text","required":true,"alias":"file_name","multivalued":false,"indices":["Ordenado"],"description":"File name"}},{"field":{"name":"error_msg","datatype":"Text","required":true,"alias":"Mensagem de erro","multivalued":false,"indices":["Nenhum"],"description":"Mensagem de erro"}},{"field":{"name":"dt_error","datatype":"DateTime","required":true,"alias":"Data do erro","multivalued":false,"indices":["Textual","Ordenado"],"description":"Data do erro"}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase - Log de erros do LBConverter","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":6,"name":"log_lbconverter","owner":"","password":"","txt_mapping":"","model":{"dt_error":"DateTime","error_msg":"Text","file_name":"Text","id_doc_orig":"Integer","id_file_orig":"Text","nm_base":"Text"}}} 2017-01-01 00:00:00 f 0 f 0
  592 +\.
  593 +
  594 +
  595 +--
  596 +-- Name: lb_base_id_base_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  597 +--
  598 +
  599 +SELECT pg_catalog.setval('lb_base_id_base_seq', 7, true);
  600 +
  601 +
  602 +--
  603 +-- Data for Name: lb_doc__form; Type: TABLE DATA; Schema: public; Owner: lbu
  604 +--
  605 +
  606 +COPY lb_doc__form (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx) FROM stdin;
  607 +\.
  608 +
  609 +
  610 +--
  611 +-- Name: lb_doc__form_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: lbu
  612 +--
  613 +
  614 +SELECT pg_catalog.setval('lb_doc__form_id_doc_seq', 1, false);
  615 +
  616 +
  617 +--
  618 +-- Data for Name: lb_doc__history; Type: TABLE DATA; Schema: public; Owner: postgres
  619 +--
  620 +
  621 +COPY lb_doc__history (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx) FROM stdin;
  622 +\.
  623 +
  624 +
  625 +--
  626 +-- Name: lb_doc__history_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  627 +--
  628 +
  629 +SELECT pg_catalog.setval('lb_doc__history_id_doc_seq', 1134, true);
  630 +
  631 +
  632 +--
  633 +-- Data for Name: lb_doc__report; Type: TABLE DATA; Schema: public; Owner: lbu
  634 +--
  635 +
  636 +COPY lb_doc__report (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx) FROM stdin;
  637 +\.
  638 +
  639 +
  640 +--
  641 +-- Name: lb_doc__report_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: lbu
  642 +--
  643 +
  644 +SELECT pg_catalog.setval('lb_doc__report_id_doc_seq', 1, false);
  645 +
  646 +
  647 +--
  648 +-- Data for Name: lb_doc__search; Type: TABLE DATA; Schema: public; Owner: lbu
  649 +--
  650 +
  651 +COPY lb_doc__search (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx) FROM stdin;
  652 +\.
  653 +
  654 +
  655 +--
  656 +-- Name: lb_doc__search_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: lbu
  657 +--
  658 +
  659 +SELECT pg_catalog.setval('lb_doc__search_id_doc_seq', 1, false);
  660 +
  661 +
  662 +--
  663 +-- Data for Name: lb_doc__user; Type: TABLE DATA; Schema: public; Owner: postgres
  664 +--
  665 +
  666 +COPY lb_doc__user (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx, name_base, id_user, status_user, access_type, name_user, creation_date_user, email_user, passwd_user) FROM stdin;
  667 +\.
  668 +
  669 +
  670 +--
  671 +-- Name: lb_doc__user_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  672 +--
  673 +
  674 +SELECT pg_catalog.setval('lb_doc__user_id_doc_seq', 1, true);
  675 +
  676 +
  677 +--
  678 +-- Data for Name: lb_doc_app_user; Type: TABLE DATA; Schema: public; Owner: lbu
  679 +--
  680 +
  681 +COPY lb_doc_app_user (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx, id_user, status_user, name_user, creation_date_user, email_user, passwd_user) FROM stdin;
  682 +\.
  683 +
  684 +
  685 +--
  686 +-- Name: lb_doc_app_user_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: lbu
  687 +--
  688 +
  689 +SELECT pg_catalog.setval('lb_doc_app_user_id_doc_seq', 1, false);
  690 +
  691 +
  692 +--
  693 +-- Data for Name: lb_doc_log_lbconverter; Type: TABLE DATA; Schema: public; Owner: postgres
  694 +--
  695 +
  696 +COPY lb_doc_log_lbconverter (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx, file_name, id_doc_orig, nm_base, dt_error) FROM stdin;
  697 +\.
  698 +
  699 +
  700 +--
  701 +-- Name: lb_doc_log_lbconverter_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  702 +--
  703 +
  704 +SELECT pg_catalog.setval('lb_doc_log_lbconverter_id_doc_seq', 481444, true);
  705 +
  706 +
  707 +--
  708 +-- Data for Name: lb_doc_log_lbindex; Type: TABLE DATA; Schema: public; Owner: postgres
  709 +--
  710 +
  711 +COPY lb_doc_log_lbindex (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx, id_doc_orig, dt_last_up_orig, nm_base, dt_error) FROM stdin;
  712 +\.
  713 +
  714 +
  715 +--
  716 +-- Name: lb_doc_log_lbindex_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  717 +--
  718 +
  719 +SELECT pg_catalog.setval('lb_doc_log_lbindex_id_doc_seq', 620125, true);
  720 +
  721 +
  722 +--
  723 +-- Data for Name: lb_file__form; Type: TABLE DATA; Schema: public; Owner: lbu
  724 +--
  725 +
  726 +COPY lb_file__form (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;
  727 +\.
  728 +
  729 +
  730 +--
  731 +-- Data for Name: lb_file__history; Type: TABLE DATA; Schema: public; Owner: postgres
  732 +--
  733 +
  734 +COPY lb_file__history (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;
  735 +\.
  736 +
  737 +
  738 +--
  739 +-- Data for Name: lb_file__report; Type: TABLE DATA; Schema: public; Owner: lbu
  740 +--
  741 +
  742 +COPY lb_file__report (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;
  743 +\.
  744 +
  745 +
  746 +--
  747 +-- Data for Name: lb_file__search; Type: TABLE DATA; Schema: public; Owner: lbu
  748 +--
  749 +
  750 +COPY lb_file__search (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;
  751 +\.
  752 +
  753 +
  754 +--
  755 +-- Data for Name: lb_file__user; Type: TABLE DATA; Schema: public; Owner: postgres
  756 +--
  757 +
  758 +COPY lb_file__user (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;
  759 +\.
  760 +
  761 +
  762 +--
  763 +-- Data for Name: lb_file_app_user; Type: TABLE DATA; Schema: public; Owner: lbu
  764 +--
  765 +
  766 +COPY lb_file_app_user (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;
  767 +\.
  768 +
  769 +
  770 +--
  771 +-- Data for Name: lb_file_log_lbconverter; Type: TABLE DATA; Schema: public; Owner: postgres
  772 +--
  773 +
  774 +COPY lb_file_log_lbconverter (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;
  775 +\.
  776 +
  777 +
  778 +--
  779 +-- Data for Name: lb_file_log_lbindex; Type: TABLE DATA; Schema: public; Owner: postgres
  780 +--
  781 +
  782 +COPY lb_file_log_lbindex (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;
  783 +\.
  784 +
  785 +
  786 +--
  787 +-- Data for Name: lb_index_error; Type: TABLE DATA; Schema: public; Owner: postgres
  788 +--
  789 +
  790 +COPY lb_index_error (id_error, base, id_doc, dt_error, msg_error) FROM stdin;
  791 +\.
  792 +
  793 +
  794 +--
  795 +-- Name: lb_index_error_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  796 +--
  797 +
  798 +SELECT pg_catalog.setval('lb_index_error_seq', 3699, true);
  799 +
  800 +
  801 +--
  802 +-- Data for Name: lb_txt_idx; Type: TABLE DATA; Schema: public; Owner: postgres
  803 +--
  804 +
  805 +COPY lb_txt_idx (id_idx, nm_idx, cfg_idx, dt_crt_idx, dt_upt_idx, url_idx, actv_idx, struct) FROM stdin;
  806 +\.
  807 +
  808 +
  809 +--
  810 +-- Name: lb_txt_idx_id_idx_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
  811 +--
  812 +
  813 +SELECT pg_catalog.setval('lb_txt_idx_id_idx_seq', 1, false);
  814 +
  815 +
  816 +--
  817 +-- Name: lb_base_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  818 +--
  819 +
  820 +ALTER TABLE ONLY lb_base
  821 + ADD CONSTRAINT lb_base_name_key UNIQUE (name);
  822 +
  823 +
  824 +--
  825 +-- Name: lb_base_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  826 +--
  827 +
  828 +ALTER TABLE ONLY lb_base
  829 + ADD CONSTRAINT lb_base_pkey PRIMARY KEY (id_base);
  830 +
  831 +
  832 +--
  833 +-- Name: lb_doc__form_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:
  834 +--
  835 +
  836 +ALTER TABLE ONLY lb_doc__form
  837 + ADD CONSTRAINT lb_doc__form_pkey PRIMARY KEY (id_doc);
  838 +
  839 +
  840 +--
  841 +-- Name: lb_doc__history_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  842 +--
  843 +
  844 +ALTER TABLE ONLY lb_doc__history
  845 + ADD CONSTRAINT lb_doc__history_pkey PRIMARY KEY (id_doc);
  846 +
  847 +
  848 +--
  849 +-- Name: lb_doc__report_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:
  850 +--
  851 +
  852 +ALTER TABLE ONLY lb_doc__report
  853 + ADD CONSTRAINT lb_doc__report_pkey PRIMARY KEY (id_doc);
  854 +
  855 +
  856 +--
  857 +-- Name: lb_doc__search_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:
  858 +--
  859 +
  860 +ALTER TABLE ONLY lb_doc__search
  861 + ADD CONSTRAINT lb_doc__search_pkey PRIMARY KEY (id_doc);
  862 +
  863 +
  864 +--
  865 +-- Name: lb_doc__user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  866 +--
  867 +
  868 +ALTER TABLE ONLY lb_doc__user
  869 + ADD CONSTRAINT lb_doc__user_pkey PRIMARY KEY (id_doc);
  870 +
  871 +
  872 +--
  873 +-- Name: lb_doc_app_user_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:
  874 +--
  875 +
  876 +ALTER TABLE ONLY lb_doc_app_user
  877 + ADD CONSTRAINT lb_doc_app_user_pkey PRIMARY KEY (id_doc);
  878 +
  879 +
  880 +--
  881 +-- Name: lb_doc_log_lbconverter_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  882 +--
  883 +
  884 +ALTER TABLE ONLY lb_doc_log_lbconverter
  885 + ADD CONSTRAINT lb_doc_log_lbconverter_pkey PRIMARY KEY (id_doc);
  886 +
  887 +
  888 +--
  889 +-- Name: lb_doc_log_lbindex_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  890 +--
  891 +
  892 +ALTER TABLE ONLY lb_doc_log_lbindex
  893 + ADD CONSTRAINT lb_doc_log_lbindex_pkey PRIMARY KEY (id_doc);
  894 +
  895 +
  896 +--
  897 +-- Name: lb_file__form_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:
  898 +--
  899 +
  900 +ALTER TABLE ONLY lb_file__form
  901 + ADD CONSTRAINT lb_file__form_pkey PRIMARY KEY (id_file);
  902 +
  903 +
  904 +--
  905 +-- Name: lb_file__history_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  906 +--
  907 +
  908 +ALTER TABLE ONLY lb_file__history
  909 + ADD CONSTRAINT lb_file__history_pkey PRIMARY KEY (id_file);
  910 +
  911 +
  912 +--
  913 +-- Name: lb_file__report_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:
  914 +--
  915 +
  916 +ALTER TABLE ONLY lb_file__report
  917 + ADD CONSTRAINT lb_file__report_pkey PRIMARY KEY (id_file);
  918 +
  919 +
  920 +--
  921 +-- Name: lb_file__search_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:
  922 +--
  923 +
  924 +ALTER TABLE ONLY lb_file__search
  925 + ADD CONSTRAINT lb_file__search_pkey PRIMARY KEY (id_file);
  926 +
  927 +
  928 +--
  929 +-- Name: lb_file__user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  930 +--
  931 +
  932 +ALTER TABLE ONLY lb_file__user
  933 + ADD CONSTRAINT lb_file__user_pkey PRIMARY KEY (id_file);
  934 +
  935 +
  936 +--
  937 +-- Name: lb_file_app_user_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:
  938 +--
  939 +
  940 +ALTER TABLE ONLY lb_file_app_user
  941 + ADD CONSTRAINT lb_file_app_user_pkey PRIMARY KEY (id_file);
  942 +
  943 +
  944 +--
  945 +-- Name: lb_file_log_lbconverter_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  946 +--
  947 +
  948 +ALTER TABLE ONLY lb_file_log_lbconverter
  949 + ADD CONSTRAINT lb_file_log_lbconverter_pkey PRIMARY KEY (id_file);
  950 +
  951 +
  952 +--
  953 +-- Name: lb_file_log_lbindex_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  954 +--
  955 +
  956 +ALTER TABLE ONLY lb_file_log_lbindex
  957 + ADD CONSTRAINT lb_file_log_lbindex_pkey PRIMARY KEY (id_file);
  958 +
  959 +
  960 +--
  961 +-- Name: lb_index_error_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  962 +--
  963 +
  964 +ALTER TABLE ONLY lb_index_error
  965 + ADD CONSTRAINT lb_index_error_pkey PRIMARY KEY (id_error);
  966 +
  967 +
  968 +--
  969 +-- Name: lb_txt_idx_nm_idx_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  970 +--
  971 +
  972 +ALTER TABLE ONLY lb_txt_idx
  973 + ADD CONSTRAINT lb_txt_idx_nm_idx_key UNIQUE (nm_idx);
  974 +
  975 +
  976 +--
  977 +-- Name: lb_txt_idx_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
  978 +--
  979 +
  980 +ALTER TABLE ONLY lb_txt_idx
  981 + ADD CONSTRAINT lb_txt_idx_pkey PRIMARY KEY (id_idx);
  982 +
  983 +
  984 +--
  985 +-- Name: public; Type: ACL; Schema: -; Owner: postgres
  986 +--
  987 +
  988 +REVOKE ALL ON SCHEMA public FROM PUBLIC;
  989 +REVOKE ALL ON SCHEMA public FROM postgres;
  990 +GRANT ALL ON SCHEMA public TO postgres;
  991 +GRANT ALL ON SCHEMA public TO PUBLIC;
  992 +
  993 +
  994 +--
  995 +-- PostgreSQL database dump complete
  996 +--
  997 +
lbn-basic-dt-strt/lbn_basic_dt_strt.sql
@@ -1,1191 +0,0 @@ @@ -1,1191 +0,0 @@
1 ---  
2 --- PostgreSQL database dump  
3 ---  
4 -  
5 -SET statement_timeout = 0;  
6 -SET lock_timeout = 0;  
7 -SET client_encoding = 'UTF8';  
8 -SET standard_conforming_strings = on;  
9 -SET check_function_bodies = false;  
10 -SET client_min_messages = warning;  
11 -  
12 ---  
13 --- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:  
14 ---  
15 -  
16 -CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;  
17 -  
18 -  
19 ---  
20 --- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:  
21 ---  
22 -  
23 -COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';  
24 -  
25 -  
26 -SET search_path = public, pg_catalog;  
27 -  
28 -SET default_tablespace = '';  
29 -  
30 -SET default_with_oids = false;  
31 -  
32 ---  
33 --- Name: lb_base; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
34 ---  
35 -  
36 -CREATE TABLE lb_base (  
37 - id_base integer NOT NULL,  
38 - name character varying NOT NULL,  
39 - struct character varying NOT NULL,  
40 - dt_base timestamp without time zone NOT NULL,  
41 - idx_exp boolean NOT NULL,  
42 - idx_exp_url character varying,  
43 - idx_exp_time integer,  
44 - file_ext boolean NOT NULL,  
45 - file_ext_time integer,  
46 - txt_mapping character varying  
47 -);  
48 -  
49 -  
50 -ALTER TABLE lb_base OWNER TO postgres;  
51 -  
52 ---  
53 --- Name: lb_base_id_base_seq; Type: SEQUENCE; Schema: public; Owner: postgres  
54 ---  
55 -  
56 -CREATE SEQUENCE lb_base_id_base_seq  
57 - START WITH 1  
58 - INCREMENT BY 1  
59 - NO MINVALUE  
60 - NO MAXVALUE  
61 - CACHE 1;  
62 -  
63 -  
64 -ALTER TABLE lb_base_id_base_seq OWNER TO postgres;  
65 -  
66 ---  
67 --- Name: lb_base_id_base_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres  
68 ---  
69 -  
70 -ALTER SEQUENCE lb_base_id_base_seq OWNED BY lb_base.id_base;  
71 -  
72 -  
73 ---  
74 --- Name: lb_doc__app_config; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
75 ---  
76 -  
77 -CREATE TABLE lb_doc__app_config (  
78 - id_doc integer NOT NULL,  
79 - document json NOT NULL,  
80 - dt_doc timestamp without time zone NOT NULL,  
81 - dt_last_up timestamp without time zone NOT NULL,  
82 - dt_del timestamp without time zone,  
83 - dt_idx timestamp without time zone,  
84 - nm_user_alteracao character varying[],  
85 - nm_apelido character varying,  
86 - nm_aplicacao character varying  
87 -);  
88 -  
89 -  
90 -ALTER TABLE lb_doc__app_config OWNER TO postgres;  
91 -  
92 ---  
93 --- Name: lb_doc__app_config_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: postgres  
94 ---  
95 -  
96 -CREATE SEQUENCE lb_doc__app_config_id_doc_seq  
97 - START WITH 1  
98 - INCREMENT BY 1  
99 - NO MINVALUE  
100 - NO MAXVALUE  
101 - CACHE 1;  
102 -  
103 -  
104 -ALTER TABLE lb_doc__app_config_id_doc_seq OWNER TO postgres;  
105 -  
106 ---  
107 --- Name: lb_doc__app_config_id_doc_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres  
108 ---  
109 -  
110 -ALTER SEQUENCE lb_doc__app_config_id_doc_seq OWNED BY lb_doc__app_config.id_doc;  
111 -  
112 -  
113 ---  
114 --- Name: lb_doc__form; Type: TABLE; Schema: public; Owner: lbu; Tablespace:  
115 ---  
116 -  
117 -CREATE TABLE lb_doc__form (  
118 - id_doc integer NOT NULL,  
119 - document json NOT NULL,  
120 - dt_doc timestamp without time zone NOT NULL,  
121 - dt_last_up timestamp without time zone NOT NULL,  
122 - dt_del timestamp without time zone,  
123 - dt_idx timestamp without time zone  
124 -);  
125 -  
126 -  
127 -ALTER TABLE lb_doc__form OWNER TO lbu;  
128 -  
129 ---  
130 --- Name: lb_doc__form_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: lbu  
131 ---  
132 -  
133 -CREATE SEQUENCE lb_doc__form_id_doc_seq  
134 - START WITH 1  
135 - INCREMENT BY 1  
136 - NO MINVALUE  
137 - NO MAXVALUE  
138 - CACHE 1;  
139 -  
140 -  
141 -ALTER TABLE lb_doc__form_id_doc_seq OWNER TO lbu;  
142 -  
143 ---  
144 --- Name: lb_doc__history; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
145 ---  
146 -  
147 -CREATE TABLE lb_doc__history (  
148 - id_doc integer NOT NULL,  
149 - document json NOT NULL,  
150 - dt_doc timestamp without time zone NOT NULL,  
151 - dt_last_up timestamp without time zone NOT NULL,  
152 - dt_del timestamp without time zone,  
153 - dt_idx timestamp without time zone  
154 -);  
155 -  
156 -  
157 -ALTER TABLE lb_doc__history OWNER TO postgres;  
158 -  
159 ---  
160 --- Name: lb_doc__history_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: postgres  
161 ---  
162 -  
163 -CREATE SEQUENCE lb_doc__history_id_doc_seq  
164 - START WITH 1  
165 - INCREMENT BY 1  
166 - NO MINVALUE  
167 - NO MAXVALUE  
168 - CACHE 1;  
169 -  
170 -  
171 -ALTER TABLE lb_doc__history_id_doc_seq OWNER TO postgres;  
172 -  
173 ---  
174 --- Name: lb_doc__history_id_doc_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres  
175 ---  
176 -  
177 -ALTER SEQUENCE lb_doc__history_id_doc_seq OWNED BY lb_doc__history.id_doc;  
178 -  
179 -  
180 ---  
181 --- Name: lb_doc__portal; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
182 ---  
183 -  
184 -CREATE TABLE lb_doc__portal (  
185 - id_doc integer NOT NULL,  
186 - document json NOT NULL,  
187 - dt_doc timestamp without time zone NOT NULL,  
188 - dt_last_up timestamp without time zone NOT NULL,  
189 - dt_del timestamp without time zone,  
190 - dt_idx timestamp without time zone,  
191 - cpf_user character varying,  
192 - nm_portal character varying  
193 -);  
194 -  
195 -  
196 -ALTER TABLE lb_doc__portal OWNER TO postgres;  
197 -  
198 ---  
199 --- Name: lb_doc__portal_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: postgres  
200 ---  
201 -  
202 -CREATE SEQUENCE lb_doc__portal_id_doc_seq  
203 - START WITH 1  
204 - INCREMENT BY 1  
205 - NO MINVALUE  
206 - NO MAXVALUE  
207 - CACHE 1;  
208 -  
209 -  
210 -ALTER TABLE lb_doc__portal_id_doc_seq OWNER TO postgres;  
211 -  
212 ---  
213 --- Name: lb_doc__portal_id_doc_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres  
214 ---  
215 -  
216 -ALTER SEQUENCE lb_doc__portal_id_doc_seq OWNED BY lb_doc__portal.id_doc;  
217 -  
218 -  
219 ---  
220 --- Name: lb_doc__report; Type: TABLE; Schema: public; Owner: lbu; Tablespace:  
221 ---  
222 -  
223 -CREATE TABLE lb_doc__report (  
224 - id_doc integer NOT NULL,  
225 - document json NOT NULL,  
226 - dt_doc timestamp without time zone NOT NULL,  
227 - dt_last_up timestamp without time zone NOT NULL,  
228 - dt_del timestamp without time zone,  
229 - dt_idx timestamp without time zone  
230 -);  
231 -  
232 -  
233 -ALTER TABLE lb_doc__report OWNER TO lbu;  
234 -  
235 ---  
236 --- Name: lb_doc__report_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: lbu  
237 ---  
238 -  
239 -CREATE SEQUENCE lb_doc__report_id_doc_seq  
240 - START WITH 1  
241 - INCREMENT BY 1  
242 - NO MINVALUE  
243 - NO MAXVALUE  
244 - CACHE 1;  
245 -  
246 -  
247 -ALTER TABLE lb_doc__report_id_doc_seq OWNER TO lbu;  
248 -  
249 ---  
250 --- Name: lb_doc__user; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
251 ---  
252 -  
253 -CREATE TABLE lb_doc__user (  
254 - id_doc integer NOT NULL,  
255 - document json NOT NULL,  
256 - dt_doc timestamp without time zone NOT NULL,  
257 - dt_last_up timestamp without time zone NOT NULL,  
258 - dt_del timestamp without time zone,  
259 - dt_idx timestamp without time zone,  
260 - name_base character varying[],  
261 - id_user integer,  
262 - status_user boolean,  
263 - access_type character varying[],  
264 - name_user character varying,  
265 - creation_date_user date,  
266 - email_user character varying,  
267 - passwd_user character varying  
268 -);  
269 -  
270 -  
271 -ALTER TABLE lb_doc__user OWNER TO postgres;  
272 -  
273 ---  
274 --- Name: lb_doc__user_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: postgres  
275 ---  
276 -  
277 -CREATE SEQUENCE lb_doc__user_id_doc_seq  
278 - START WITH 1  
279 - INCREMENT BY 1  
280 - NO MINVALUE  
281 - NO MAXVALUE  
282 - CACHE 1;  
283 -  
284 -  
285 -ALTER TABLE lb_doc__user_id_doc_seq OWNER TO postgres;  
286 -  
287 ---  
288 --- Name: lb_doc__user_id_doc_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres  
289 ---  
290 -  
291 -ALTER SEQUENCE lb_doc__user_id_doc_seq OWNED BY lb_doc__user.id_doc;  
292 -  
293 -  
294 ---  
295 --- Name: lb_doc_app_user; Type: TABLE; Schema: public; Owner: lbu; Tablespace:  
296 ---  
297 -  
298 -CREATE TABLE lb_doc_app_user (  
299 - id_doc integer NOT NULL,  
300 - document json NOT NULL,  
301 - dt_doc timestamp without time zone NOT NULL,  
302 - dt_last_up timestamp without time zone NOT NULL,  
303 - dt_del timestamp without time zone,  
304 - dt_idx timestamp without time zone,  
305 - id_user character varying,  
306 - status_user boolean,  
307 - name_user character varying,  
308 - creation_date_user date,  
309 - email_user character varying,  
310 - passwd_user character varying  
311 -);  
312 -  
313 -  
314 -ALTER TABLE lb_doc_app_user OWNER TO lbu;  
315 -  
316 ---  
317 --- Name: lb_doc_app_user_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: lbu  
318 ---  
319 -  
320 -CREATE SEQUENCE lb_doc_app_user_id_doc_seq  
321 - START WITH 1  
322 - INCREMENT BY 1  
323 - NO MINVALUE  
324 - NO MAXVALUE  
325 - CACHE 1;  
326 -  
327 -  
328 -ALTER TABLE lb_doc_app_user_id_doc_seq OWNER TO lbu;  
329 -  
330 ---  
331 --- Name: lb_doc_log_lbconverter; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
332 ---  
333 -  
334 -CREATE TABLE lb_doc_log_lbconverter (  
335 - id_doc integer NOT NULL,  
336 - document json NOT NULL,  
337 - dt_doc timestamp without time zone NOT NULL,  
338 - dt_last_up timestamp without time zone NOT NULL,  
339 - dt_del timestamp without time zone,  
340 - dt_idx timestamp without time zone,  
341 - file_name character varying,  
342 - id_doc_orig integer,  
343 - nm_base character varying,  
344 - dt_error timestamp without time zone  
345 -);  
346 -  
347 -  
348 -ALTER TABLE lb_doc_log_lbconverter OWNER TO postgres;  
349 -  
350 ---  
351 --- Name: lb_doc_log_lbconverter_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: postgres  
352 ---  
353 -  
354 -CREATE SEQUENCE lb_doc_log_lbconverter_id_doc_seq  
355 - START WITH 1  
356 - INCREMENT BY 1  
357 - NO MINVALUE  
358 - NO MAXVALUE  
359 - CACHE 1;  
360 -  
361 -  
362 -ALTER TABLE lb_doc_log_lbconverter_id_doc_seq OWNER TO postgres;  
363 -  
364 ---  
365 --- Name: lb_doc_log_lbconverter_id_doc_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres  
366 ---  
367 -  
368 -ALTER SEQUENCE lb_doc_log_lbconverter_id_doc_seq OWNED BY lb_doc_log_lbconverter.id_doc;  
369 -  
370 -  
371 ---  
372 --- Name: lb_doc_log_lbindex; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
373 ---  
374 -  
375 -CREATE TABLE lb_doc_log_lbindex (  
376 - id_doc integer NOT NULL,  
377 - document json NOT NULL,  
378 - dt_doc timestamp without time zone NOT NULL,  
379 - dt_last_up timestamp without time zone NOT NULL,  
380 - dt_del timestamp without time zone,  
381 - dt_idx timestamp without time zone,  
382 - id_doc_orig integer,  
383 - dt_last_up_orig timestamp without time zone,  
384 - nm_base character varying,  
385 - dt_error timestamp without time zone  
386 -);  
387 -  
388 -  
389 -ALTER TABLE lb_doc_log_lbindex OWNER TO postgres;  
390 -  
391 ---  
392 --- Name: lb_doc_log_lbindex_id_doc_seq; Type: SEQUENCE; Schema: public; Owner: postgres  
393 ---  
394 -  
395 -CREATE SEQUENCE lb_doc_log_lbindex_id_doc_seq  
396 - START WITH 1  
397 - INCREMENT BY 1  
398 - NO MINVALUE  
399 - NO MAXVALUE  
400 - CACHE 1;  
401 -  
402 -  
403 -ALTER TABLE lb_doc_log_lbindex_id_doc_seq OWNER TO postgres;  
404 -  
405 ---  
406 --- Name: lb_doc_log_lbindex_id_doc_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres  
407 ---  
408 -  
409 -ALTER SEQUENCE lb_doc_log_lbindex_id_doc_seq OWNED BY lb_doc_log_lbindex.id_doc;  
410 -  
411 -  
412 ---  
413 --- Name: lb_file__app_config; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
414 ---  
415 -  
416 -CREATE TABLE lb_file__app_config (  
417 - id_file uuid NOT NULL,  
418 - id_doc integer,  
419 - filename character varying NOT NULL,  
420 - file bytea NOT NULL,  
421 - mimetype character varying NOT NULL,  
422 - filesize integer NOT NULL,  
423 - filetext character varying,  
424 - dt_ext_text timestamp without time zone  
425 -);  
426 -  
427 -  
428 -ALTER TABLE lb_file__app_config OWNER TO postgres;  
429 -  
430 ---  
431 --- Name: lb_file__form; Type: TABLE; Schema: public; Owner: lbu; Tablespace:  
432 ---  
433 -  
434 -CREATE TABLE lb_file__form (  
435 - id_file uuid NOT NULL,  
436 - id_doc integer,  
437 - filename character varying NOT NULL,  
438 - file bytea NOT NULL,  
439 - mimetype character varying NOT NULL,  
440 - filesize integer NOT NULL,  
441 - filetext character varying,  
442 - dt_ext_text timestamp without time zone  
443 -);  
444 -  
445 -  
446 -ALTER TABLE lb_file__form OWNER TO lbu;  
447 -  
448 ---  
449 --- Name: lb_file__history; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
450 ---  
451 -  
452 -CREATE TABLE lb_file__history (  
453 - id_file uuid NOT NULL,  
454 - id_doc integer,  
455 - filename character varying NOT NULL,  
456 - file bytea NOT NULL,  
457 - mimetype character varying NOT NULL,  
458 - filesize integer NOT NULL,  
459 - filetext character varying,  
460 - dt_ext_text timestamp without time zone  
461 -);  
462 -  
463 -  
464 -ALTER TABLE lb_file__history OWNER TO postgres;  
465 -  
466 ---  
467 --- Name: lb_file__portal; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
468 ---  
469 -  
470 -CREATE TABLE lb_file__portal (  
471 - id_file uuid NOT NULL,  
472 - id_doc integer,  
473 - filename character varying NOT NULL,  
474 - file bytea NOT NULL,  
475 - mimetype character varying NOT NULL,  
476 - filesize integer NOT NULL,  
477 - filetext character varying,  
478 - dt_ext_text timestamp without time zone  
479 -);  
480 -  
481 -  
482 -ALTER TABLE lb_file__portal OWNER TO postgres;  
483 -  
484 ---  
485 --- Name: lb_file__report; Type: TABLE; Schema: public; Owner: lbu; Tablespace:  
486 ---  
487 -  
488 -CREATE TABLE lb_file__report (  
489 - id_file uuid NOT NULL,  
490 - id_doc integer,  
491 - filename character varying NOT NULL,  
492 - file bytea NOT NULL,  
493 - mimetype character varying NOT NULL,  
494 - filesize integer NOT NULL,  
495 - filetext character varying,  
496 - dt_ext_text timestamp without time zone  
497 -);  
498 -  
499 -  
500 -ALTER TABLE lb_file__report OWNER TO lbu;  
501 -  
502 ---  
503 --- Name: lb_file__user; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
504 ---  
505 -  
506 -CREATE TABLE lb_file__user (  
507 - id_file uuid NOT NULL,  
508 - id_doc integer,  
509 - filename character varying NOT NULL,  
510 - file bytea NOT NULL,  
511 - mimetype character varying NOT NULL,  
512 - filesize integer NOT NULL,  
513 - filetext character varying,  
514 - dt_ext_text timestamp without time zone  
515 -);  
516 -  
517 -  
518 -ALTER TABLE lb_file__user OWNER TO postgres;  
519 -  
520 ---  
521 --- Name: lb_file_app_user; Type: TABLE; Schema: public; Owner: lbu; Tablespace:  
522 ---  
523 -  
524 -CREATE TABLE lb_file_app_user (  
525 - id_file uuid NOT NULL,  
526 - id_doc integer,  
527 - filename character varying NOT NULL,  
528 - file bytea NOT NULL,  
529 - mimetype character varying NOT NULL,  
530 - filesize integer NOT NULL,  
531 - filetext character varying,  
532 - dt_ext_text timestamp without time zone  
533 -);  
534 -  
535 -  
536 -ALTER TABLE lb_file_app_user OWNER TO lbu;  
537 -  
538 ---  
539 --- Name: lb_file_log_lbconverter; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
540 ---  
541 -  
542 -CREATE TABLE lb_file_log_lbconverter (  
543 - id_file uuid NOT NULL,  
544 - id_doc integer,  
545 - filename character varying NOT NULL,  
546 - file bytea NOT NULL,  
547 - mimetype character varying NOT NULL,  
548 - filesize integer NOT NULL,  
549 - filetext character varying,  
550 - dt_ext_text timestamp without time zone  
551 -);  
552 -  
553 -  
554 -ALTER TABLE lb_file_log_lbconverter OWNER TO postgres;  
555 -  
556 ---  
557 --- Name: lb_file_log_lbindex; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
558 ---  
559 -  
560 -CREATE TABLE lb_file_log_lbindex (  
561 - id_file uuid NOT NULL,  
562 - id_doc integer,  
563 - filename character varying NOT NULL,  
564 - file bytea NOT NULL,  
565 - mimetype character varying NOT NULL,  
566 - filesize integer NOT NULL,  
567 - filetext character varying,  
568 - dt_ext_text timestamp without time zone  
569 -);  
570 -  
571 -  
572 -ALTER TABLE lb_file_log_lbindex OWNER TO postgres;  
573 -  
574 ---  
575 --- Name: lb_index_error; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
576 ---  
577 -  
578 -CREATE TABLE lb_index_error (  
579 - id_error integer NOT NULL,  
580 - base character varying NOT NULL,  
581 - id_doc integer NOT NULL,  
582 - dt_error timestamp without time zone NOT NULL,  
583 - msg_error character varying  
584 -);  
585 -  
586 -  
587 -ALTER TABLE lb_index_error OWNER TO postgres;  
588 -  
589 ---  
590 --- Name: lb_index_error_id_error_seq; Type: SEQUENCE; Schema: public; Owner: postgres  
591 ---  
592 -  
593 -CREATE SEQUENCE lb_index_error_id_error_seq  
594 - START WITH 1  
595 - INCREMENT BY 1  
596 - NO MINVALUE  
597 - NO MAXVALUE  
598 - CACHE 1;  
599 -  
600 -  
601 -ALTER TABLE lb_index_error_id_error_seq OWNER TO postgres;  
602 -  
603 ---  
604 --- Name: lb_index_error_id_error_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres  
605 ---  
606 -  
607 -ALTER SEQUENCE lb_index_error_id_error_seq OWNED BY lb_index_error.id_error;  
608 -  
609 -  
610 ---  
611 --- Name: lb_index_error_seq; Type: SEQUENCE; Schema: public; Owner: lbu  
612 ---  
613 -  
614 -CREATE SEQUENCE lb_index_error_seq  
615 - START WITH 1  
616 - INCREMENT BY 1  
617 - NO MINVALUE  
618 - NO MAXVALUE  
619 - CACHE 1;  
620 -  
621 -  
622 -ALTER TABLE lb_index_error_seq OWNER TO lbu;  
623 -  
624 ---  
625 --- Name: lb_txt_idx; Type: TABLE; Schema: public; Owner: postgres; Tablespace:  
626 ---  
627 -  
628 -CREATE TABLE lb_txt_idx (  
629 - id_idx integer NOT NULL,  
630 - nm_idx character varying NOT NULL,  
631 - cfg_idx character varying NOT NULL,  
632 - dt_crt_idx timestamp without time zone NOT NULL,  
633 - dt_upt_idx timestamp without time zone NOT NULL,  
634 - url_idx character varying NOT NULL,  
635 - actv_idx boolean NOT NULL,  
636 - struct character varying NOT NULL  
637 -);  
638 -  
639 -  
640 -ALTER TABLE lb_txt_idx OWNER TO postgres;  
641 -  
642 ---  
643 --- Name: lb_txt_idx_id_idx_seq; Type: SEQUENCE; Schema: public; Owner: postgres  
644 ---  
645 -  
646 -CREATE SEQUENCE lb_txt_idx_id_idx_seq  
647 - START WITH 1  
648 - INCREMENT BY 1  
649 - NO MINVALUE  
650 - NO MAXVALUE  
651 - CACHE 1;  
652 -  
653 -  
654 -ALTER TABLE lb_txt_idx_id_idx_seq OWNER TO postgres;  
655 -  
656 ---  
657 --- Name: lb_txt_idx_id_idx_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres  
658 ---  
659 -  
660 -ALTER SEQUENCE lb_txt_idx_id_idx_seq OWNED BY lb_txt_idx.id_idx;  
661 -  
662 -  
663 ---  
664 --- Name: id_base; Type: DEFAULT; Schema: public; Owner: postgres  
665 ---  
666 -  
667 -ALTER TABLE ONLY lb_base ALTER COLUMN id_base SET DEFAULT nextval('lb_base_id_base_seq'::regclass);  
668 -  
669 -  
670 ---  
671 --- Name: id_doc; Type: DEFAULT; Schema: public; Owner: postgres  
672 ---  
673 -  
674 -ALTER TABLE ONLY lb_doc__app_config ALTER COLUMN id_doc SET DEFAULT nextval('lb_doc__app_config_id_doc_seq'::regclass);  
675 -  
676 -  
677 ---  
678 --- Name: id_doc; Type: DEFAULT; Schema: public; Owner: postgres  
679 ---  
680 -  
681 -ALTER TABLE ONLY lb_doc__history ALTER COLUMN id_doc SET DEFAULT nextval('lb_doc__history_id_doc_seq'::regclass);  
682 -  
683 -  
684 ---  
685 --- Name: id_doc; Type: DEFAULT; Schema: public; Owner: postgres  
686 ---  
687 -  
688 -ALTER TABLE ONLY lb_doc__portal ALTER COLUMN id_doc SET DEFAULT nextval('lb_doc__portal_id_doc_seq'::regclass);  
689 -  
690 -  
691 ---  
692 --- Name: id_doc; Type: DEFAULT; Schema: public; Owner: postgres  
693 ---  
694 -  
695 -ALTER TABLE ONLY lb_doc__user ALTER COLUMN id_doc SET DEFAULT nextval('lb_doc__user_id_doc_seq'::regclass);  
696 -  
697 -  
698 ---  
699 --- Name: id_doc; Type: DEFAULT; Schema: public; Owner: postgres  
700 ---  
701 -  
702 -ALTER TABLE ONLY lb_doc_log_lbconverter ALTER COLUMN id_doc SET DEFAULT nextval('lb_doc_log_lbconverter_id_doc_seq'::regclass);  
703 -  
704 -  
705 ---  
706 --- Name: id_doc; Type: DEFAULT; Schema: public; Owner: postgres  
707 ---  
708 -  
709 -ALTER TABLE ONLY lb_doc_log_lbindex ALTER COLUMN id_doc SET DEFAULT nextval('lb_doc_log_lbindex_id_doc_seq'::regclass);  
710 -  
711 -  
712 ---  
713 --- Name: id_error; Type: DEFAULT; Schema: public; Owner: postgres  
714 ---  
715 -  
716 -ALTER TABLE ONLY lb_index_error ALTER COLUMN id_error SET DEFAULT nextval('lb_index_error_id_error_seq'::regclass);  
717 -  
718 -  
719 ---  
720 --- Name: id_idx; Type: DEFAULT; Schema: public; Owner: postgres  
721 ---  
722 -  
723 -ALTER TABLE ONLY lb_txt_idx ALTER COLUMN id_idx SET DEFAULT nextval('lb_txt_idx_id_idx_seq'::regclass);  
724 -  
725 -  
726 ---  
727 --- Data for Name: lb_base; Type: TABLE DATA; Schema: public; Owner: postgres  
728 ---  
729 -  
730 -COPY lb_base (id_base, name, struct, dt_base, idx_exp, idx_exp_url, idx_exp_time, file_ext, file_ext_time, txt_mapping) FROM stdin;  
731 -1 _app_config {"content": [{"field": {"name": "nm_aplicacao", "datatype": "Text", "required": false, "alias": "Aplicação", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "Define o nome da aplicação"}}, {"field": {"name": "nm_apelido", "datatype": "Text", "required": false, "alias": "nm_apelido", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "Apelido da aplicação. Campo usado para identificar à qual aplicação o config pertence ou de qual aplicação. Oriundo da tabela Aplicação nm_apelido."}}, {"group": {"content": [{"field": {"name": "manual", "datatype": "File", "required": false, "alias": "manual", "multivalued": false, "indices": ["Textual"], "description": "Manuais"}}, {"field": {"name": "ch_manual", "datatype": "Text", "required": true, "alias": "Chave do manual", "multivalued": false, "indices": ["Textual"], "description": "Chave para tornar única a identificação de cada manual."}}, {"field": {"name": "nm_manual", "datatype": "Text", "required": true, "alias": "Nome do manual", "multivalued": false, "indices": ["Textual"], "description": "Nome do manual"}}, {"field": {"name": "color", "datatype": "Text", "required": false, "alias": "Cor", "multivalued": false, "indices": ["Textual"], "description": "Cor na qual aparece para download"}}, {"group": {"content": [{"field": {"name": "nr_cpf_user_alteracao", "datatype": "Text", "required": false, "alias": "Número do CPF do usuário da alteração", "multivalued": false, "indices": ["Textual"], "description": "Número do CPF do usuário da ultima alteração. Campo usado para informar o cpf do usuário que fez a ultima alteração."}}, {"field": {"name": "dt_alteracao", "datatype": "DateTime", "required": false, "alias": "Data e hora da alteração", "multivalued": false, "indices": ["Textual"], "description": "Data e Hora no formato DD/MM/AAAA - HH:MM:SS . Campo usado para informar a data e hora da alteração."}}, {"field": {"name": "nm_user_alteracao", "datatype": "Text", "required": false, "alias": "Nome do usuário da alteração", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "Nome do usuário da alteração. Campo usado para informar o nome do usuário que fez a alteração."}}], "metadata": {"multivalued": true, "alias": "Alteração", "name": "alteracao", "description": "Alteração"}}}, {"group": {"content": [{"field": {"name": "nr_cpf_user_inclusao", "datatype": "Text", "required": false, "alias": "Número do CPF do usuário que incluiu.", "multivalued": false, "indices": ["Textual"], "description": "Número do CPF do usuário que incluiu. Campo usado para informar o cpf do usuário que fez a inclusão do registro."}}, {"field": {"name": "dt_inclusao", "datatype": "Text", "required": false, "alias": "Data e Hora da inclusão", "multivalued": false, "indices": ["Textual"], "description": "Data e Hora no formato DD/MM/AAAA - HH:MM:SS de inclusão do usuário no Cadastro. Campo usado para informar a data que o usuário foi incluído."}}, {"field": {"name": "nm_user_inclusao", "datatype": "Text", "required": false, "alias": "Nome do usuário que incluiu", "multivalued": false, "indices": ["Textual"], "description": "Nome do usuário que incluiu. Campo usado para informar o nome do usuário que realizou a inclusão do usuário."}}], "metadata": {"multivalued": false, "alias": "Inclusão", "name": "inclusao", "description": "Inclusão"}}}], "metadata": {"multivalued": true, "alias": "Manuais", "name": "manuais", "description": "Manuais"}}}], "metadata": {"idx_exp": false, "description": "Configurações da aplicação", "color": "#000000", "file_ext_time": 0, "dt_base": "01/01/2015 00:00:00", "idx_exp_url": "", "file_ext": false, "password": "12345678", "id_base": 1, "name": "_app_config", "idx_exp_time": 0, "model": {"manuais": [{"inclusao": {"dt_inclusao": "Text", "nr_cpf_user_inclusao": "Text", "nm_user_inclusao": "Text"}, "color": "Text", "manual": "File", "ch_manual": "Text", "nm_manual": "Text", "alteracao": [{"dt_alteracao": "DateTime", "nm_user_alteracao": "Text", "nr_cpf_user_alteracao": "Text"}]}], "nm_aplicacao": "Text", "nm_apelido": "Text"}}} 2015-01-01 00:00:00 f 0 f 0 \N  
732 -2 _history {"content": [{"field": {"alias": "id_base", "description": "Base old ID.", "name": "id_base", "datatype": "Integer", "indices": ["Textual"], "required": true, "multivalued": false}}, {"field": {"alias": "author", "description": "Event Author.", "name": "author", "datatype": "Text", "indices": ["Textual"], "required": true, "multivalued": false}}, {"field": {"alias": "date", "description": "Event Date.", "name": "date", "datatype": "DateTime", "indices": ["Textual"], "required": true, "multivalued": false}}, {"field": {"alias": "name", "description": "Base old name.", "name": "name", "datatype": "Text", "indices": ["Textual"], "required": true, "multivalued": false}}, {"field": {"alias": "structure", "description": "Base old structure", "name": "structure", "datatype": "Json", "indices": ["Textual"], "required": true, "multivalued": false}}, {"field": {"alias": "status", "description": "Base status", "name": "status", "datatype": "Text", "indices": ["Textual"], "required": true, "multivalued": false}}], "metadata": {"idx_exp": false, "description": "LightBase - History Meta Base.", "color": "#000000", "file_ext_time": 10, "idx_exp_time": 0, "idx_exp_url": "", "model": {"status": "Text", "name": "Text", "author": "Text", "id_base": "Integer", "date": "DateTime", "structure": "Json"}, "password": "password", "dt_base": "01/01/2015 00:00:00", "file_ext": false, "id_base": 2, "name": "_history"}} 2015-01-01 00:00:00 f 0 f 10 \N  
733 -3 _portal {"content": [{"field": {"name": "nm_portal", "datatype": "Text", "required": true, "alias": "Nome do Portal", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "Contm o nome do portal. Usado para diferenciar os portais."}}, {"field": {"name": "alias_portal", "datatype": "Text", "required": true, "alias": "Apelido do Portal", "multivalued": false, "indices": ["Textual"], "description": "Este campo informa um apelido, possibilitando exibir um nome amigvel."}}, {"field": {"name": "ds_portal", "datatype": "Text", "required": true, "alias": "Descriço", "multivalued": false, "indices": ["Textual"], "description": "Contm um texto falando sobre o portal. Qual a finalidade do portal criado."}}, {"field": {"name": "cpf_user", "datatype": "Text", "required": false, "alias": "CPF do Usurio", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "Indica o cpf do usurio que criou o portal. Auxilia a listar os portais de cada usurio"}}, {"group": {"content": [{"field": {"name": "nm_base", "datatype": "Text", "required": true, "alias": "Nome da Base", "multivalued": false, "indices": ["Textual"], "description": "Contm o nome da base, deve ser o mesmo nome com o qual a base est salva no lightbase. Ser usado para auxiliar nas pesquisas feitas pelo portal."}}, {"field": {"name": "ds_base", "datatype": "Text", "required": true, "alias": "Apelido da Base", "multivalued": false, "indices": ["Textual"], "description": "Este campo informa um apelido, possibilitando exibir um nome amigvel no Portal de Pesquisas."}}, {"field": {"name": "url_index", "datatype": "Url", "required": false, "alias": "Url do Indexador", "multivalued": false, "indices": ["Textual"], "description": "Uma URL que indica o host onde ser feita a pesquisa via REST. Pode ser, por exemplo, a URL de um host com o ELastic Search instalado e com os dados indexados."}}, {"field": {"name": "url_detail", "datatype": "Url", "required": false, "alias": "URL de Detalhe", "multivalued": false, "indices": ["Textual"], "description": "Representa a URL da pgina de detalhes. O valor oriundo da aplicaço em questo, ou seja, de acordo a aplicaço referenciada o nome da pgina pode ser DetalhesRecebidos.aspx ou DetalhesExpedido.aspx"}}, {"field": {"name": "url_app", "datatype": "Url", "required": false, "alias": "Url da aplicaço", "multivalued": false, "indices": ["Textual"], "description": "Este campo usado para possibilitar links entre o portal e a aplicaço que utiliza esta base, como, por exemplo, abrir os detalhes de um registro pesquisado para abrir na pgina da aplicaço."}}, {"field": {"name": "nr_order", "datatype": "Integer", "required": false, "alias": "Ordem", "multivalued": false, "indices": ["Textual"], "description": "Auxilia a ordenar as abas no portal de pesquisa."}}, {"group": {"content": [{"group": {"content": [{"field": {"name": "nm_display_direct", "datatype": "Text", "required": false, "alias": "Nome exibido", "multivalued": false, "indices": ["Textual"], "description": "Contm o nome com o qual o campo deve ser exibido na tela de pesquisa direta."}}, {"field": {"name": "in_display_direct", "datatype": "Boolean", "required": false, "alias": "Exibir?", "multivalued": false, "indices": ["Textual"], "description": "Contm uma flag informando se o campo deve ser exibido na tela de pesquisa direta."}}, {"field": {"name": "nm_type_control_direct", "datatype": "Text", "required": false, "alias": "Tipo de controle", "multivalued": false, "indices": ["Textual"], "description": "Define o controle que deve ser carregado para o campo na tela de pesquisa direta."}}, {"field": {"name": "nr_position_direct", "datatype": "Integer", "required": false, "alias": "Posiço", "multivalued": false, "indices": ["Textual"], "description": "Contm um inteiro informando a posiço do campo na tela de pesquisa direta."}}, {"field": {"name": "script_direct", "datatype": "TextArea", "required": false, "alias": "script", "multivalued": false, "indices": ["Textual"], "description": "Contm um script que ser executado no momento que o campo for exibido na tela de pesquisa direta."}}], "metadata": {"multivalued": false, "alias": "Informaçes busca direta", "name": "inf_direct_search", "description": "Contm informaçes de como o campo se comporta na tela de busca direta."}}}, {"group": {"content": [{"field": {"name": "nm_display_advanced", "datatype": "Text", "required": false, "alias": "Nome exibido", "multivalued": false, "indices": ["Textual"], "description": "Contm o nome com o qual o campo deve ser exibido na tela de pesquisa avançada."}}, {"field": {"name": "in_display_advanced", "datatype": "Boolean", "required": false, "alias": "Exibir?", "multivalued": false, "indices": ["Textual"], "description": "Contm uma flag informando se o campo deve ser exibido na tela de pesquisa avançada."}}, {"field": {"name": "in_fixed_advanced", "datatype": "Boolean", "required": false, "alias": "Campo fixo?", "multivalued": false, "indices": ["Textual"], "description": "Contm uma flag informando se o campo fixo na tela de pesquisa avançada. Nesta tela os campo so escolhidos dinamicamente e inseridos como argumento de pesquisa, mas se o campo for fixo ela j fica fixado na tela."}}, {"field": {"name": "nm_type_control_advanced", "datatype": "Text", "required": false, "alias": "Tipo de Controle", "multivalued": false, "indices": ["Textual"], "description": "Define o controle que deve ser carregado na pesquisa avançada para exibir este campo."}}, {"field": {"name": "script_advanced", "datatype": "TextArea", "required": false, "alias": "script", "multivalued": false, "indices": ["Textual"], "description": "Contm um script para ser executado na pgina nome momento em que o campo exibido."}}], "metadata": {"multivalued": false, "alias": "Informaçes pesquisa avançada", "name": "inf_advanced_search", "description": "Contm informaçes que definem como o campo se comporta na tela de pesquisa avançada."}}}, {"group": {"content": [{"field": {"name": "nm_display_listed", "datatype": "Text", "required": false, "alias": "Nome exibido", "multivalued": false, "indices": ["Textual"], "description": "Contm o nome que deve exibido na coluna da tabela resultado de pesquisa."}}, {"field": {"name": "in_select_listed", "datatype": "Boolean", "required": false, "alias": "Recuperar?", "multivalued": false, "indices": ["Textual"], "description": "Contm uma flag informando se o campo deve ser selecionado no resultado de pesquisa, ou seja, recuperado nas consultas."}}, {"field": {"name": "in_display_listed", "datatype": "Boolean", "required": false, "alias": "Exibir?", "multivalued": false, "indices": ["Textual"], "description": "Contm uma flag informando se o campo deve ser exibido no resultado de pesquisa"}}, {"field": {"name": "in_search_listed", "datatype": "Boolean", "required": false, "alias": "Pesquisar?", "multivalued": false, "indices": ["Textual"], "description": "Contm uma flag informando se o campo usado na pesquisa. Essa informaço relevante para a pesquisa direta, que realiza a busca nos campos que contm essa flag marcada com true."}}, {"field": {"name": "nr_position_listed", "datatype": "Integer", "required": false, "alias": "Posiço", "multivalued": false, "indices": ["Textual"], "description": "Defina a posiço da coluna na tabela de resultado de pesquisa."}}, {"field": {"name": "script_listed", "datatype": "TextArea", "required": false, "alias": "script", "multivalued": false, "indices": ["Textual"], "description": "Contm um script que ser executado na exibiço do campo na tabela de resultado de pesquisa. til para criar botes, links, etc."}}, {"field": {"name": "in_sortable_listed", "datatype": "Boolean", "required": false, "alias": "Ordenar?", "multivalued": false, "indices": ["Textual"], "description": "Indica se a coluna ordenvel na tabela do resultado de pesquisa."}}], "metadata": {"multivalued": false, "alias": "Informaçes resultado de pesquisa", "name": "inf_listed_search", "description": "Contm as informaçes do campo de como se comportar na pesquisa listada."}}}, {"group": {"content": [{"field": {"name": "nm_display_detailed", "datatype": "Text", "required": false, "alias": "Nome exibido", "multivalued": false, "indices": ["Textual"], "description": "contm o nome com o qual o campo deve ser exibido na tela de detalhes."}}, {"field": {"name": "in_display_detailed", "datatype": "Boolean", "required": false, "alias": "Exibir?", "multivalued": false, "indices": ["Textual"], "description": "Contm uma flag dizendo se o campo exibido ou no tela de detalhes."}}, {"field": {"name": "in_search_detailed", "datatype": "Boolean", "required": false, "alias": "Pesquisar?", "multivalued": false, "indices": ["Textual"], "description": "Contm uma flag informando se o campo pesquisado para chamar a pgina de detalhes."}}, {"field": {"name": "nr_position_detailed", "datatype": "Integer", "required": false, "alias": "Posiço", "multivalued": false, "indices": ["Textual"], "description": "Contm um inteiro informando a posiço do campo na tela de detalhes."}}, {"field": {"name": "script_detailed", "datatype": "TextArea", "required": false, "alias": "Script", "multivalued": false, "indices": ["Textual"], "description": "Contm um script que deve ser executado na exibiço do campo na pgina de detalhes. Por exemplo, criar um link dentro campo."}}], "metadata": {"multivalued": false, "alias": "Informaçes da tela de detalhes", "name": "inf_detailed_search", "description": "Contm as informaçes de como o campo se comporta na tela de detalhes. Caso esta tela seja tratada no portal, pois ela pode ser de outra aplicaço e neste caso usasse o campo url_detail."}}}, {"group": {"content": [{"field": {"name": "data_tabulated", "datatype": "Json", "required": false, "alias": "Lista de dados", "multivalued": false, "indices": ["Textual"], "description": "Contm uma lista de objetos json. Serve para criar uma tabela esttica com os campo tabelados. Por exemplo, uma tabela de siglas e nomes de estados."}}, {"field": {"name": "nm_field_value_tabulated", "datatype": "Text", "required": false, "alias": "Nome do campo valor", "multivalued": false, "indices": ["Textual"], "description": "Contm o nome do campo da base referenciada que contm o valor."}}, {"field": {"name": "nm_field_key_tabulated", "datatype": "Text", "required": false, "alias": "Nome Campo Chave", "multivalued": false, "indices": ["Textual"], "description": "Contm o nome do campo da base referenciada que contm a chave do valor."}}, {"field": {"name": "relational_key_tabulated", "datatype": "Text", "required": false, "alias": "Chave relacional", "multivalued": false, "indices": ["Textual"], "description": "Contm o nome da coluna que contm a chave da relaço. o campo referenciado na base."}}, {"field": {"name": "nm_table_tabulated", "datatype": "Text", "required": false, "alias": "Nome da tabela referenciada", "multivalued": false, "indices": ["Textual"], "description": "Contm o nome da tabela que est sendo usada para tabelar o campo."}}], "metadata": {"multivalued": false, "alias": "Informaçes Campo Tabelado", "name": "inf_field_tabulated", "description": "Define as informaçes de campos tabelados. S precisa ser preenchido se o tipo de campo for igual a tabulated."}}}, {"field": {"name": "groups_can_view", "datatype": "Text", "required": false, "alias": "Grupos", "multivalued": true, "indices": ["Textual"], "description": "Define os grupos que podem visualizar o campo."}}, {"field": {"name": "ds_field", "datatype": "Text", "required": false, "alias": "Apelido do campo", "multivalued": false, "indices": ["Textual"], "description": "Define o apelido do campo. um nome mais amigvel para ser exibido no portal."}}, {"field": {"name": "nm_field", "datatype": "Text", "required": true, "alias": "Nome do campo", "multivalued": false, "indices": ["Textual"], "description": "Nome do campo da base. Deve coincidir com o nome do campo que est salvo no lightbase."}}, {"field": {"name": "nm_type_field", "datatype": "Text", "required": true, "alias": "Tipo de campo", "multivalued": false, "indices": ["Textual"], "description": "Indica qual o tipo de campo. utilizado pelo portal para saber como exibir o campo. oriundo dos tipos de campo que o lightbase usa para criar campos."}}], "metadata": {"multivalued": true, "alias": "Campo", "name": "field", "description": "Representa os campos da base. Informa onde e como sero usados pelo portal."}}}], "metadata": {"multivalued": true, "alias": "Bases do Portal", "name": "bases", "description": "Contm as Bases do portal."}}}], "metadata": {"idx_exp": false, "description": "Novo conceito do portal. Uma base _portal lista todos os portais separados por nome e com o id do usu-ario que criou.", "color": "", "file_ext_time": 0, "dt_base": "01/01/2015 00:00:00", "idx_exp_url": "", "file_ext": false, "password": "BRLight@)!$", "id_base": 3, "name": "_portal", "idx_exp_time": 0, "model": {"alias_portal": "Text", "cpf_user": "Text", "bases": [{"url_index": "Url", "nm_base": "Text", "field": [{"inf_advanced_search": {"in_fixed_advanced": "Boolean", "in_display_advanced": "Boolean", "nm_type_control_advanced": "Text", "nm_display_advanced": "Text", "script_advanced": "TextArea"}, "inf_listed_search": {"in_search_listed": "Boolean", "nm_display_listed": "Text", "in_select_listed": "Boolean", "in_sortable_listed": "Boolean", "nr_position_listed": "Integer", "script_listed": "TextArea", "in_display_listed": "Boolean"}, "inf_field_tabulated": {"nm_table_tabulated": "Text", "nm_field_key_tabulated": "Text", "relational_key_tabulated": "Text", "data_tabulated": "Json", "nm_field_value_tabulated": "Text"}, "inf_direct_search": {"nr_position_direct": "Integer", "nm_display_direct": "Text", "script_direct": "TextArea", "nm_type_control_direct": "Text", "in_display_direct": "Boolean"}, "groups_can_view": ["Text"], "ds_field": "Text", "nm_type_field": "Text", "nm_field": "Text", "inf_detailed_search": {"nm_display_detailed": "Text", "in_search_detailed": "Boolean", "in_display_detailed": "Boolean", "script_detailed": "TextArea", "nr_position_detailed": "Integer"}}], "url_detail": "Url", "url_app": "Url", "nr_order": "Integer", "ds_base": "Text"}], "nm_portal": "Text", "ds_portal": "Text"}}} 2015-01-01 00:00:00 f 0 f 0 \N  
734 -4 _user {"content": [{"field": {"alias": "id", "description": "LightBase's uses ID", "name": "id_user", "datatype": "Integer", "indices": ["Textual", "Ordenado"], "required": true, "multivalued": false}}, {"field": {"alias": "name", "description": "User's name", "name": "name_user", "datatype": "Text", "indices": ["Textual", "Ordenado"], "required": true, "multivalued": false}}, {"field": {"alias": "email", "description": "User's mail", "name": "email_user", "datatype": "Text", "indices": ["Textual", "Ordenado"], "required": true, "multivalued": false}}, {"field": {"alias": "passwd", "description": "User's password", "name": "passwd_user", "datatype": "Text", "indices": ["Textual", "Ordenado"], "required": true, "multivalued": false}}, {"group": {"content": [{"field": {"alias": "name_base", "description": "Name of the base the user can access", "name": "name_base", "datatype": "Text", "indices": ["Textual", "Ordenado", "Fuzzy"], "required": false, "multivalued": false}}, {"field": {"alias": "access_type", "description": "Type of access the user has", "name": "access_type", "datatype": "Text", "indices": ["Textual", "Ordenado"], "required": false, "multivalued": false}}], "metadata": {"alias": "bases", "description": "List of bases that the user can access and what kind of access it is", "multivalued": true, "name": "bases_user"}}}, {"field": {"alias": "creation_date", "description": "Date the user account was created", "name": "creation_date_user", "datatype": "Date", "indices": ["Textual", "Ordenado"], "required": true, "multivalued": false}}, {"field": {"alias": "status", "description": "Check if the user is activer or not", "name": "status_user", "datatype": "Boolean", "indices": ["Textual", "Ordenado"], "required": true, "multivalued": false}}], "metadata": {"idx_exp": false, "description": "LightBase's Users Meta Base.", "color": "#000000", "file_ext_time": 0, "idx_exp_time": 0, "idx_exp_url": "", "model": {"name_user": "Text", "status_user": "Boolean", "bases_user": [{"name_base": "Text", "access_type": "Text"}], "id_user": "Integer", "creation_date_user": "Date", "email_user": "Text", "passwd_user": "Text"}, "password": "3Ax!vj6gV#DEtR", "dt_base": "01/01/2015 00:00:00", "file_ext": false, "id_base": 4, "name": "_user"}} 2015-01-01 00:00:00 f 0 f 0 \N  
735 -5 log_lbconverter {"content": [{"field": {"name": "nm_base", "datatype": "Text", "required": true, "alias": "Nome da base", "multivalued": false, "indices": ["Ordenado"], "description": "Nome da base"}}, {"field": {"name": "id_doc_orig", "datatype": "Integer", "required": true, "alias": "id_doc_orig", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "id do documento que originou o erro."}}, {"field": {"name": "id_file_orig", "datatype": "Text", "required": true, "alias": "id_file_orig", "multivalued": false, "indices": ["Textual", "Unico"], "description": "ID do arquivo que originou o erro."}}, {"field": {"name": "file_name", "datatype": "Text", "required": true, "alias": "file_name", "multivalued": false, "indices": ["Ordenado"], "description": "File name"}}, {"field": {"name": "error_msg", "datatype": "Text", "required": true, "alias": "Mensagem de erro", "multivalued": false, "indices": ["Nenhum"], "description": "Mensagem de erro"}}, {"field": {"name": "dt_error", "datatype": "DateTime", "required": true, "alias": "Data do erro", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "Data do erro"}}], "metadata": {"idx_exp": false, "description": "LightBase - Log de erros do LBConverter", "color": "#000000", "file_ext_time": 0, "dt_base": "01/01/2015 00:00:00", "idx_exp_url": "", "file_ext": false, "password": "qqqqqqqq", "id_base": 5, "name": "log_lbconverter", "idx_exp_time": 0, "model": {"id_file_orig": "Text", "nm_base": "Text", "file_name": "Text", "id_doc_orig": "Integer", "dt_error": "DateTime", "error_msg": "Text"}}} 2015-01-01 00:00:00 f 0 f 0 \N  
736 -6 log_lbindex {"content": [{"field": {"name": "nm_base", "datatype": "Text", "required": true, "alias": "Nome da base", "multivalued": false, "indices": ["Ordenado"], "description": "Nome da base"}}, {"field": {"name": "id_doc_orig", "datatype": "Integer", "required": true, "alias": "identificador do documento", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "id do documento que originou o erro."}}, {"field": {"name": "error_msg", "datatype": "Text", "required": true, "alias": "Mensagem de erro", "multivalued": false, "indices": ["Nenhum"], "description": "Mensagem de erro"}}, {"field": {"name": "dt_error", "datatype": "DateTime", "required": true, "alias": "Data do erro", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "Data e Hora no formato DD/MM/AAAA - HH:MM:SS do erro"}}, {"field": {"name": "dt_last_up_orig", "datatype": "DateTime", "required": true, "alias": "dt_last_up_orig", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "Data e Hora no formato DD/MM/AAAA - HH:MM:SS da última atualização do registro que originou o erro."}}], "metadata": {"idx_exp": false, "description": "LightBase - Log de erros do LBIndex", "color": "#000000", "file_ext_time": 0, "dt_base": "01/01/2015 00:00:00", "idx_exp_url": "", "file_ext": false, "password": "qqqqqqqq", "id_base": 6, "name": "log_lbindex", "idx_exp_time": 0, "model": {"dt_last_up_orig": "DateTime", "id_doc_orig": "Integer", "dt_error": "DateTime", "error_msg": "Text", "nm_base": "Text"}}} 2015-01-01 00:00:00 f 0 f 0 \N  
737 -7 _report {"content": [{"field": {"name": "id_base", "datatype": "Integer", "required": true, "alias": "id_base", "multivalued": false, "indices": ["Textual"], "description": "Base ID."}}, {"field": {"name": "author", "datatype": "Text", "required": true, "alias": "author", "multivalued": false, "indices": ["Textual"], "description": "Event Author."}}, {"field": {"name": "name", "datatype": "Text", "required": true, "alias": "name", "multivalued": false, "indices": ["Textual"], "description": "Report name."}}, {"field": {"name": "description", "datatype": "Text", "required": true, "alias": "description", "multivalued": false, "indices": ["Textual"], "description": "Report description."}}, {"field": {"name": "structure", "datatype": "Json", "required": true, "alias": "structure", "multivalued": false, "indices": ["Textual"], "description": "Report structure"}}], "metadata": {"idx_exp": false, "description": "LightBase's Report Meta Base.", "color": "#000000", "file_ext_time": 0, "dt_base": "24/11/2016 17:30:11", "idx_exp_url": "", "file_ext": false, "password": "3Ax!vj6gV#DEtR", "txt_mapping": "", "id_base": 7, "name": "_report", "idx_exp_time": 0, "model": {"structure": "Json", "description": "Text", "name": "Text", "id_base": "Integer", "author": "Text"}}} 2016-11-24 17:30:11.453657 f 0 f 0  
738 -8 _form {"content": [{"field": {"name": "id_base", "datatype": "Integer", "required": true, "alias": "id_base", "multivalued": false, "indices": ["Textual"], "description": "Base ID."}}, {"field": {"name": "author", "datatype": "Text", "required": true, "alias": "author", "multivalued": false, "indices": ["Textual"], "description": "Event Author."}}, {"field": {"name": "name", "datatype": "Text", "required": true, "alias": "name", "multivalued": false, "indices": ["Textual"], "description": "Form name."}}, {"field": {"name": "description", "datatype": "Text", "required": true, "alias": "description", "multivalued": false, "indices": ["Textual"], "description": "Form description."}}, {"field": {"name": "structure", "datatype": "Json", "required": true, "alias": "structure", "multivalued": false, "indices": ["Textual"], "description": "Form structure"}}], "metadata": {"idx_exp": false, "description": "LightBase's Form Meta Base.", "color": "#000000", "file_ext_time": 0, "dt_base": "24/11/2016 17:30:43", "idx_exp_url": "", "file_ext": false, "password": "3Ax!vj6gV#DEtR", "txt_mapping": "", "id_base": 8, "name": "_form", "idx_exp_time": 0, "model": {"structure": "Json", "description": "Text", "name": "Text", "id_base": "Integer", "author": "Text"}}} 2016-11-24 17:30:43.374583 f 0 f 0  
739 -9 app_user {"content": [{"field": {"name": "id_user", "datatype": "Text", "required": true, "alias": "id_user", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "LightBase's uses ID"}}, {"field": {"name": "name_user", "datatype": "Text", "required": true, "alias": "name", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "User's name"}}, {"field": {"name": "email_user", "datatype": "Text", "required": true, "alias": "email", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "User's mail"}}, {"field": {"name": "passwd_user", "datatype": "Text", "required": true, "alias": "passwd", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "User's password"}}, {"field": {"name": "bases", "datatype": "Integer", "required": false, "alias": "bases", "multivalued": true, "indices": ["Textual"], "description": "Id doc list the base the user is owner"}}, {"field": {"name": "forms", "datatype": "Integer", "required": false, "alias": "forms", "multivalued": true, "indices": ["Textual"], "description": "Id doc list of the form where user can access"}}, {"field": {"name": "reports", "datatype": "Text", "required": false, "alias": "reports", "multivalued": true, "indices": ["Textual"], "description": "Id doc list of the report where user can access"}}, {"group": {"content": [{"field": {"name": "id", "datatype": "Integer", "required": true, "alias": "id", "multivalued": false, "indices": ["Textual"], "description": "Id doc of element"}}, {"field": {"name": "type", "datatype": "Text", "required": true, "alias": "type", "multivalued": false, "indices": ["Textual"], "description": "Types allowed form, base and report"}}], "metadata": {"multivalued": true, "alias": "shortcuts", "name": "shortcuts", "description": "List of shortcuts of user"}}}, {"field": {"name": "creation_date_user", "datatype": "Date", "required": true, "alias": "creation_date", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "Date the user account was created"}}, {"field": {"name": "status_user", "datatype": "Boolean", "required": true, "alias": "status", "multivalued": false, "indices": ["Textual", "Ordenado"], "description": "Check if the user is activer or not"}}], "metadata": {"idx_exp": false, "description": "LightBase's Users Meta Base.", "color": "#000000", "file_ext_time": 0, "dt_base": "24/11/2016 17:31:03", "idx_exp_url": "", "file_ext": false, "password": "3Ax!vj6gV#DEtR", "txt_mapping": "", "id_base": 9, "name": "app_user", "idx_exp_time": 0, "model": {"name_user": "Text", "status_user": "Boolean", "shortcuts": [{"type": "Text", "id": "Integer"}], "reports": ["Text"], "forms": ["Integer"], "bases": ["Integer"], "id_user": "Text", "creation_date_user": "Date", "email_user": "Text", "passwd_user": "Text"}}} 2016-11-24 17:31:03.745122 f 0 f 0  
740 -\.  
741 -  
742 -  
743 ---  
744 --- Name: lb_base_id_base_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres  
745 ---  
746 -  
747 -SELECT pg_catalog.setval('lb_base_id_base_seq', 9, true);  
748 -  
749 -  
750 ---  
751 --- Data for Name: lb_doc__app_config; Type: TABLE DATA; Schema: public; Owner: postgres  
752 ---  
753 -  
754 -COPY lb_doc__app_config (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx, nm_user_alteracao, nm_apelido, nm_aplicacao) FROM stdin;  
755 -\.  
756 -  
757 -  
758 ---  
759 --- Name: lb_doc__app_config_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres  
760 ---  
761 -  
762 -SELECT pg_catalog.setval('lb_doc__app_config_id_doc_seq', 1, false);  
763 -  
764 -  
765 ---  
766 --- Data for Name: lb_doc__form; Type: TABLE DATA; Schema: public; Owner: lbu  
767 ---  
768 -  
769 -COPY lb_doc__form (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx) FROM stdin;  
770 -\.  
771 -  
772 -  
773 ---  
774 --- Name: lb_doc__form_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: lbu  
775 ---  
776 -  
777 -SELECT pg_catalog.setval('lb_doc__form_id_doc_seq', 1, false);  
778 -  
779 -  
780 ---  
781 --- Data for Name: lb_doc__history; Type: TABLE DATA; Schema: public; Owner: postgres  
782 ---  
783 -  
784 -COPY lb_doc__history (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx) FROM stdin;  
785 -\.  
786 -  
787 -  
788 ---  
789 --- Name: lb_doc__history_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres  
790 ---  
791 -  
792 -SELECT pg_catalog.setval('lb_doc__history_id_doc_seq', 1, false);  
793 -  
794 -  
795 ---  
796 --- Data for Name: lb_doc__portal; Type: TABLE DATA; Schema: public; Owner: postgres  
797 ---  
798 -  
799 -COPY lb_doc__portal (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx, cpf_user, nm_portal) FROM stdin;  
800 -\.  
801 -  
802 -  
803 ---  
804 --- Name: lb_doc__portal_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres  
805 ---  
806 -  
807 -SELECT pg_catalog.setval('lb_doc__portal_id_doc_seq', 1, false);  
808 -  
809 -  
810 ---  
811 --- Data for Name: lb_doc__report; Type: TABLE DATA; Schema: public; Owner: lbu  
812 ---  
813 -  
814 -COPY lb_doc__report (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx) FROM stdin;  
815 -\.  
816 -  
817 -  
818 ---  
819 --- Name: lb_doc__report_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: lbu  
820 ---  
821 -  
822 -SELECT pg_catalog.setval('lb_doc__report_id_doc_seq', 1, false);  
823 -  
824 -  
825 ---  
826 --- Data for Name: lb_doc__user; Type: TABLE DATA; Schema: public; Owner: postgres  
827 ---  
828 -  
829 -COPY lb_doc__user (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx, name_base, id_user, status_user, access_type, name_user, creation_date_user, email_user, passwd_user) FROM stdin;  
830 -\.  
831 -  
832 -  
833 ---  
834 --- Name: lb_doc__user_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres  
835 ---  
836 -  
837 -SELECT pg_catalog.setval('lb_doc__user_id_doc_seq', 1, false);  
838 -  
839 -  
840 ---  
841 --- Data for Name: lb_doc_app_user; Type: TABLE DATA; Schema: public; Owner: lbu  
842 ---  
843 -  
844 -COPY lb_doc_app_user (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx, id_user, status_user, name_user, creation_date_user, email_user, passwd_user) FROM stdin;  
845 -\.  
846 -  
847 -  
848 ---  
849 --- Name: lb_doc_app_user_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: lbu  
850 ---  
851 -  
852 -SELECT pg_catalog.setval('lb_doc_app_user_id_doc_seq', 1, false);  
853 -  
854 -  
855 ---  
856 --- Data for Name: lb_doc_log_lbconverter; Type: TABLE DATA; Schema: public; Owner: postgres  
857 ---  
858 -  
859 -COPY lb_doc_log_lbconverter (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx, file_name, id_doc_orig, nm_base, dt_error) FROM stdin;  
860 -\.  
861 -  
862 -  
863 ---  
864 --- Name: lb_doc_log_lbconverter_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres  
865 ---  
866 -  
867 -SELECT pg_catalog.setval('lb_doc_log_lbconverter_id_doc_seq', 1, false);  
868 -  
869 -  
870 ---  
871 --- Data for Name: lb_doc_log_lbindex; Type: TABLE DATA; Schema: public; Owner: postgres  
872 ---  
873 -  
874 -COPY lb_doc_log_lbindex (id_doc, document, dt_doc, dt_last_up, dt_del, dt_idx, id_doc_orig, dt_last_up_orig, nm_base, dt_error) FROM stdin;  
875 -\.  
876 -  
877 -  
878 ---  
879 --- Name: lb_doc_log_lbindex_id_doc_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres  
880 ---  
881 -  
882 -SELECT pg_catalog.setval('lb_doc_log_lbindex_id_doc_seq', 1, false);  
883 -  
884 -  
885 ---  
886 --- Data for Name: lb_file__app_config; Type: TABLE DATA; Schema: public; Owner: postgres  
887 ---  
888 -  
889 -COPY lb_file__app_config (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;  
890 -\.  
891 -  
892 -  
893 ---  
894 --- Data for Name: lb_file__form; Type: TABLE DATA; Schema: public; Owner: lbu  
895 ---  
896 -  
897 -COPY lb_file__form (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;  
898 -\.  
899 -  
900 -  
901 ---  
902 --- Data for Name: lb_file__history; Type: TABLE DATA; Schema: public; Owner: postgres  
903 ---  
904 -  
905 -COPY lb_file__history (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;  
906 -\.  
907 -  
908 -  
909 ---  
910 --- Data for Name: lb_file__portal; Type: TABLE DATA; Schema: public; Owner: postgres  
911 ---  
912 -  
913 -COPY lb_file__portal (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;  
914 -\.  
915 -  
916 -  
917 ---  
918 --- Data for Name: lb_file__report; Type: TABLE DATA; Schema: public; Owner: lbu  
919 ---  
920 -  
921 -COPY lb_file__report (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;  
922 -\.  
923 -  
924 -  
925 ---  
926 --- Data for Name: lb_file__user; Type: TABLE DATA; Schema: public; Owner: postgres  
927 ---  
928 -  
929 -COPY lb_file__user (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;  
930 -\.  
931 -  
932 -  
933 ---  
934 --- Data for Name: lb_file_app_user; Type: TABLE DATA; Schema: public; Owner: lbu  
935 ---  
936 -  
937 -COPY lb_file_app_user (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;  
938 -\.  
939 -  
940 -  
941 ---  
942 --- Data for Name: lb_file_log_lbconverter; Type: TABLE DATA; Schema: public; Owner: postgres  
943 ---  
944 -  
945 -COPY lb_file_log_lbconverter (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;  
946 -\.  
947 -  
948 -  
949 ---  
950 --- Data for Name: lb_file_log_lbindex; Type: TABLE DATA; Schema: public; Owner: postgres  
951 ---  
952 -  
953 -COPY lb_file_log_lbindex (id_file, id_doc, filename, file, mimetype, filesize, filetext, dt_ext_text) FROM stdin;  
954 -\.  
955 -  
956 -  
957 ---  
958 --- Data for Name: lb_index_error; Type: TABLE DATA; Schema: public; Owner: postgres  
959 ---  
960 -  
961 -COPY lb_index_error (id_error, base, id_doc, dt_error, msg_error) FROM stdin;  
962 -\.  
963 -  
964 -  
965 ---  
966 --- Name: lb_index_error_id_error_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres  
967 ---  
968 -  
969 -SELECT pg_catalog.setval('lb_index_error_id_error_seq', 1, false);  
970 -  
971 -  
972 ---  
973 --- Name: lb_index_error_seq; Type: SEQUENCE SET; Schema: public; Owner: lbu  
974 ---  
975 -  
976 -SELECT pg_catalog.setval('lb_index_error_seq', 1, false);  
977 -  
978 -  
979 ---  
980 --- Data for Name: lb_txt_idx; Type: TABLE DATA; Schema: public; Owner: postgres  
981 ---  
982 -  
983 -COPY lb_txt_idx (id_idx, nm_idx, cfg_idx, dt_crt_idx, dt_upt_idx, url_idx, actv_idx, struct) FROM stdin;  
984 -\.  
985 -  
986 -  
987 ---  
988 --- Name: lb_txt_idx_id_idx_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres  
989 ---  
990 -  
991 -SELECT pg_catalog.setval('lb_txt_idx_id_idx_seq', 1, false);  
992 -  
993 -  
994 ---  
995 --- Name: lb_base_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
996 ---  
997 -  
998 -ALTER TABLE ONLY lb_base  
999 - ADD CONSTRAINT lb_base_name_key UNIQUE (name);  
1000 -  
1001 -  
1002 ---  
1003 --- Name: lb_base_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1004 ---  
1005 -  
1006 -ALTER TABLE ONLY lb_base  
1007 - ADD CONSTRAINT lb_base_pkey PRIMARY KEY (id_base);  
1008 -  
1009 -  
1010 ---  
1011 --- Name: lb_doc__app_config_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1012 ---  
1013 -  
1014 -ALTER TABLE ONLY lb_doc__app_config  
1015 - ADD CONSTRAINT lb_doc__app_config_pkey PRIMARY KEY (id_doc);  
1016 -  
1017 -  
1018 ---  
1019 --- Name: lb_doc__form_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:  
1020 ---  
1021 -  
1022 -ALTER TABLE ONLY lb_doc__form  
1023 - ADD CONSTRAINT lb_doc__form_pkey PRIMARY KEY (id_doc);  
1024 -  
1025 -  
1026 ---  
1027 --- Name: lb_doc__history_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1028 ---  
1029 -  
1030 -ALTER TABLE ONLY lb_doc__history  
1031 - ADD CONSTRAINT lb_doc__history_pkey PRIMARY KEY (id_doc);  
1032 -  
1033 -  
1034 ---  
1035 --- Name: lb_doc__portal_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1036 ---  
1037 -  
1038 -ALTER TABLE ONLY lb_doc__portal  
1039 - ADD CONSTRAINT lb_doc__portal_pkey PRIMARY KEY (id_doc);  
1040 -  
1041 -  
1042 ---  
1043 --- Name: lb_doc__report_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:  
1044 ---  
1045 -  
1046 -ALTER TABLE ONLY lb_doc__report  
1047 - ADD CONSTRAINT lb_doc__report_pkey PRIMARY KEY (id_doc);  
1048 -  
1049 -  
1050 ---  
1051 --- Name: lb_doc__user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1052 ---  
1053 -  
1054 -ALTER TABLE ONLY lb_doc__user  
1055 - ADD CONSTRAINT lb_doc__user_pkey PRIMARY KEY (id_doc);  
1056 -  
1057 -  
1058 ---  
1059 --- Name: lb_doc_app_user_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:  
1060 ---  
1061 -  
1062 -ALTER TABLE ONLY lb_doc_app_user  
1063 - ADD CONSTRAINT lb_doc_app_user_pkey PRIMARY KEY (id_doc);  
1064 -  
1065 -  
1066 ---  
1067 --- Name: lb_doc_log_lbconverter_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1068 ---  
1069 -  
1070 -ALTER TABLE ONLY lb_doc_log_lbconverter  
1071 - ADD CONSTRAINT lb_doc_log_lbconverter_pkey PRIMARY KEY (id_doc);  
1072 -  
1073 -  
1074 ---  
1075 --- Name: lb_doc_log_lbindex_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1076 ---  
1077 -  
1078 -ALTER TABLE ONLY lb_doc_log_lbindex  
1079 - ADD CONSTRAINT lb_doc_log_lbindex_pkey PRIMARY KEY (id_doc);  
1080 -  
1081 -  
1082 ---  
1083 --- Name: lb_file__app_config_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1084 ---  
1085 -  
1086 -ALTER TABLE ONLY lb_file__app_config  
1087 - ADD CONSTRAINT lb_file__app_config_pkey PRIMARY KEY (id_file);  
1088 -  
1089 -  
1090 ---  
1091 --- Name: lb_file__form_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:  
1092 ---  
1093 -  
1094 -ALTER TABLE ONLY lb_file__form  
1095 - ADD CONSTRAINT lb_file__form_pkey PRIMARY KEY (id_file);  
1096 -  
1097 -  
1098 ---  
1099 --- Name: lb_file__history_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1100 ---  
1101 -  
1102 -ALTER TABLE ONLY lb_file__history  
1103 - ADD CONSTRAINT lb_file__history_pkey PRIMARY KEY (id_file);  
1104 -  
1105 -  
1106 ---  
1107 --- Name: lb_file__portal_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1108 ---  
1109 -  
1110 -ALTER TABLE ONLY lb_file__portal  
1111 - ADD CONSTRAINT lb_file__portal_pkey PRIMARY KEY (id_file);  
1112 -  
1113 -  
1114 ---  
1115 --- Name: lb_file__report_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:  
1116 ---  
1117 -  
1118 -ALTER TABLE ONLY lb_file__report  
1119 - ADD CONSTRAINT lb_file__report_pkey PRIMARY KEY (id_file);  
1120 -  
1121 -  
1122 ---  
1123 --- Name: lb_file__user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1124 ---  
1125 -  
1126 -ALTER TABLE ONLY lb_file__user  
1127 - ADD CONSTRAINT lb_file__user_pkey PRIMARY KEY (id_file);  
1128 -  
1129 -  
1130 ---  
1131 --- Name: lb_file_app_user_pkey; Type: CONSTRAINT; Schema: public; Owner: lbu; Tablespace:  
1132 ---  
1133 -  
1134 -ALTER TABLE ONLY lb_file_app_user  
1135 - ADD CONSTRAINT lb_file_app_user_pkey PRIMARY KEY (id_file);  
1136 -  
1137 -  
1138 ---  
1139 --- Name: lb_file_log_lbconverter_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1140 ---  
1141 -  
1142 -ALTER TABLE ONLY lb_file_log_lbconverter  
1143 - ADD CONSTRAINT lb_file_log_lbconverter_pkey PRIMARY KEY (id_file);  
1144 -  
1145 -  
1146 ---  
1147 --- Name: lb_file_log_lbindex_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1148 ---  
1149 -  
1150 -ALTER TABLE ONLY lb_file_log_lbindex  
1151 - ADD CONSTRAINT lb_file_log_lbindex_pkey PRIMARY KEY (id_file);  
1152 -  
1153 -  
1154 ---  
1155 --- Name: lb_index_error_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1156 ---  
1157 -  
1158 -ALTER TABLE ONLY lb_index_error  
1159 - ADD CONSTRAINT lb_index_error_pkey PRIMARY KEY (id_error);  
1160 -  
1161 -  
1162 ---  
1163 --- Name: lb_txt_idx_nm_idx_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1164 ---  
1165 -  
1166 -ALTER TABLE ONLY lb_txt_idx  
1167 - ADD CONSTRAINT lb_txt_idx_nm_idx_key UNIQUE (nm_idx);  
1168 -  
1169 -  
1170 ---  
1171 --- Name: lb_txt_idx_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:  
1172 ---  
1173 -  
1174 -ALTER TABLE ONLY lb_txt_idx  
1175 - ADD CONSTRAINT lb_txt_idx_pkey PRIMARY KEY (id_idx);  
1176 -  
1177 -  
1178 ---  
1179 --- Name: public; Type: ACL; Schema: -; Owner: postgres  
1180 ---  
1181 -  
1182 -REVOKE ALL ON SCHEMA public FROM PUBLIC;  
1183 -REVOKE ALL ON SCHEMA public FROM postgres;  
1184 -GRANT ALL ON SCHEMA public TO postgres;  
1185 -GRANT ALL ON SCHEMA public TO PUBLIC;  
1186 -  
1187 -  
1188 ---  
1189 --- PostgreSQL database dump complete  
1190 ---  
1191 -