Changeset 6548


Ignore:
Timestamp:
06/20/12 10:46:21 (9 years ago)
Author:
leticiabohnert
Message:

Ticket #2851 - Correção do tables_update e default.

Location:
trunk/workflow/setup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/workflow/setup/default_records.inc.php

    r6537 r6548  
    8585        $workflowDB->query('CREATE TABLE centro_custo (organizacao_id integer NOT NULL, centro_custo_id serial NOT NULL, nm_centro_custo integer NOT NULL, grupo character varying(30), descricao character varying(100) NOT NULL)'); 
    8686        $workflowDB->query('CREATE TABLE localidade (organizacao_id integer NOT NULL, localidade_id serial NOT NULL, centro_custo_id integer, descricao character varying(50) NOT NULL, empresa CHARACTER VARYING(100), endereco CHARACTER VARYING(100), complemento CHARACTER VARYING(50), cep CHARACTER VARYING(9), bairro CHARACTER VARYING(30), cidade CHARACTER VARYING(50), uf CHARACTER(2))'); 
    87         $workflowDB->query('CREATE TABLE funcionario (funcionario_id int4 NOT NULL, area_id integer NOT NULL, localidade_id integer NOT NULL, centro_custo_id integer, organizacao_id integer NOT NULL, funcionario_status_id integer NOT NULL, cargo_id int4, nivel int2, funcionario_categoria_id int4, titulo CHARACTER VARYING(30), funcao CHARACTER VARYING(200), data_admissao DATE, apelido CHARACTER VARYING(20)'); 
     87        $workflowDB->query('CREATE TABLE funcionario (funcionario_id int4 NOT NULL, area_id integer NOT NULL, localidade_id integer NOT NULL, centro_custo_id integer, organizacao_id integer NOT NULL, funcionario_status_id integer NOT NULL, cargo_id int4, nivel int2, funcionario_categoria_id int4, titulo CHARACTER VARYING(30), funcao CHARACTER VARYING(200), data_admissao DATE, apelido CHARACTER VARYING(20))'); 
    8888        $workflowDB->query('CREATE TABLE area (organizacao_id integer NOT NULL, area_id serial NOT NULL, area_status_id integer NOT NULL, superior_area_id integer, centro_custo_id integer, titular_funcionario_id int4, sigla character varying(20) NOT NULL, descricao character varying(100) NOT NULL, ativa character varying(1) NOT NULL, auxiliar_funcionario_id int4)'); 
    8989        $workflowDB->query('CREATE TABLE funcionario_status (funcionario_status_id serial NOT NULL, descricao character varying(50) NOT NULL, exibir character varying(1) NOT NULL, organizacao_id integer NOT NULL)'); 
  • trunk/workflow/setup/tables_update.inc.php

    r6544 r6548  
    326326                        } 
    327327 
    328  
     328                /* reconnect to the previous database */ 
     329                $GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']); 
    329330                $GLOBALS['setup_info']['workflow']['currentver'] = '2.4.0'; 
    330331                return $GLOBALS['setup_info']['workflow']['currentver']; 
     
    345346                        $workflowDB->query('ALTER TABLE ONLY public.funcionario ADD COLUMN apelido CHARACTER VARYING(20)'); 
    346347                } 
    347          
     348 
     349                /* reconnect to the previous database */ 
     350                $GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']); 
    348351                $GLOBALS['setup_info']['workflow']['currentver'] = '2.4.1'; 
    349352                return $GLOBALS['setup_info']['workflow']['currentver']; 
Note: See TracChangeset for help on using the changeset viewer.