Changeset 6537


Ignore:
Timestamp:
06/18/12 16:24:43 (9 years ago)
Author:
leticiabohnert
Message:

Ticket #2851 - Inclusão dos campos função, data adm. e apelido no BD (setup).

Location:
trunk/workflow/setup
Files:
3 edited

Legend:

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

    r5726 r6537  
    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))'); 
     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/setup.inc.php

    r5298 r6537  
    1313        $setup_info['workflow']['name']                 = 'workflow'; 
    1414        $setup_info['workflow']['title']                = 'Workflow Management'; 
    15         $setup_info['workflow']['version']              = '2.4.0'; 
     15        $setup_info['workflow']['version']              = '2.4.1'; 
    1616        $setup_info['workflow']['app_order']    = 10; 
    1717        $setup_info['workflow']['enable']               = 1; 
  • trunk/workflow/setup/tables_update.inc.php

    r5726 r6537  
    330330                return $GLOBALS['setup_info']['workflow']['currentver']; 
    331331        } 
     332         
     333        function workflow_upgrade2_4_0() 
     334        { 
     335         
     336                $workflowHostInfo = extractDatabaseParameters(); 
     337 
     338                /* connect to workflow database */ 
     339                $workflowDB = $GLOBALS['phpgw']->ADOdb; 
     340                if ($workflowDB->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow')) 
     341                { 
     342                        $workflowDB->query('ALTER TABLE ONLY public.funcionario ADD COLUMN funcao CHARACTER VARYING(200)'); 
     343                        $workflowDB->query('ALTER TABLE ONLY public.funcionario ADD COLUMN data_admissao DATE'); 
     344                        $workflowDB->query('ALTER TABLE ONLY public.funcionario ADD COLUMN apelido CHARACTER VARYING(20)'); 
     345                } 
     346         
     347                $GLOBALS['setup_info']['workflow']['currentver'] = '2.4.1'; 
     348                return $GLOBALS['setup_info']['workflow']['currentver']; 
     349        } 
    332350?> 
Note: See TracChangeset for help on using the changeset viewer.