Changeset 4181


Ignore:
Timestamp:
04/29/11 10:53:14 (8 years ago)
Author:
rafaelraymundo
Message:

Ticket #1726 - Corrigido problema ao instalar módulo. r4172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.0.1/filemanager/setup/default_records.inc.php

    r3956 r4181  
    1111 
    1212        // CREATE TABLE PHPGW_VFS 
    13         $oProc->query("CREATE TABLE phpgw_vfs ( file_id integer DEFAULT nextval(('seq_phpgw_vfs'::text)::regclass) NOT NULL, 
     13        $res_exists = $oProc->query("select count(*) from information_schema.tables where table_name = 'phpgw_vfs'"); 
     14    $oProc->next_record(); 
     15    if(!$oProc->f(0)) { 
     16                $oProc->query("CREATE TABLE phpgw_vfs ( file_id integer DEFAULT nextval(('seq_phpgw_vfs'::text)::regclass) NOT NULL, 
    1417                                        owner_id integer NOT NULL, 
    1518                                        createdby_id integer, 
     
    3235                                        );"); 
    3336         
     37                // CREATE SEQUENCE 
     38                $oProc->query("CREATE SEQUENCE seq_phpgw_vfs INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1;"); 
     39         
     40                // SET VALUE SEQUENCE 
     41                $oProc->query("SELECT pg_catalog.setval('seq_phpgw_vfs', 4, true);");            
     42    } 
     43     
    3444        // CREATE TABLE PHPGW_VFS_QUOTA 
    3545        $oProc->query("CREATE TABLE phpgw_vfs_quota (directory VARCHAR(100), quota_size INT NOT NULL, PRIMARY KEY (directory));"); 
    3646         
    37         // CREATE SEQUENCE 
    38         $oProc->query("CREATE SEQUENCE seq_phpgw_vfs INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1;"); 
    39          
    40         // SET VALUE SEQUENCE 
    41         $oProc->query("SELECT pg_catalog.setval('seq_phpgw_vfs', 4, true);"); 
    42  
    4347        // DELETE 
    4448        $oProc->query("DELETE FROM phpgw_config WHERE config_app = 'filemanager';"); 
Note: See TracChangeset for help on using the changeset viewer.