Changeset 8142 for trunk/phpgwapi/setup/tables_update.inc.php
- Timestamp:
- 05/06/13 18:33:29 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/setup/tables_update.inc.php
r7909 r8142 20 20 $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.0.008'; 21 21 return $GLOBALS['setup_info']['phpgwapi']['currentver']; 22 23 22 } 24 23 … … 28 27 $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.0.pre-alpha'; 29 28 return $GLOBALS['setup_info']['phpgwapi']['currentver']; 30 31 29 } 32 30 … … 179 177 function phpgwapi_upgrade2_4_2() 180 178 { 181 182 179 $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.5.0'; 180 return $GLOBALS['setup_info']['phpgwapi']['currentver']; 183 181 } 184 182 … … 186 184 function phpgwapi_upgrade2_5_0() 187 185 { 188 $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.5.1'; 189 global $setup_info,$phpgw_setup; 190 $phpgw_setup->oProc->query("ALTER TABLE phpgw_access_log ALTER COLUMN ip TYPE character varying(255) "); 191 192 return $GLOBALS['setup_info']['phpgwapi']['currentver']; 193 } 194 195 186 $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.5.1'; 187 global $setup_info,$phpgw_setup; 188 $phpgw_setup->oProc->query("ALTER TABLE phpgw_access_log ALTER COLUMN ip TYPE character varying(255) "); 189 190 return $GLOBALS['setup_info']['phpgwapi']['currentver']; 191 } 192 193 $test[] = '2.5.1'; 194 function phpgwapi_upgrade2_5_1() 195 { 196 global $phpgw_setup; 197 198 $phpgw_setup->oProc->query( 'select * from information_schema.tables where table_name= \'phpgw_vfs\''); 199 if( !$phpgw_setup->oProc->next_record() ) 200 { 201 $phpgw_setup->oProc->CreateTable('phpgw_vfs', array( 202 'fd' => array( 203 'file_id' => array('type' => 'auto','nullable' => False), 204 'owner_id' => array('type' => 'int','precision' => '4','nullable' => False), 205 'createdby_id' => array('type' => 'int','precision' => '4'), 206 'modifiedby_id' => array('type' => 'int','precision' => '4'), 207 'created' => array('type' => 'timestamp','nullable' => False,'default' => '1970-01-01'), 208 'modified' => array('type' => 'timestamp'), 209 'size' => array('type' => 'int','precision' => '4'), 210 'mime_type' => array('type' => 'varchar','precision' => '64'), 211 'deleteable' => array('type' => 'char','precision' => '1','default' => 'Y'), 212 'comment' => array('type' => 'varchar','precision' => '255'), 213 'app' => array('type' => 'varchar','precision' => '25'), 214 'directory' => array('type' => 'varchar','precision' => '255'), 215 'name' => array('type' => 'varchar','precision' => '128','nullable' => False), 216 'link_directory' => array('type' => 'varchar','precision' => '255'), 217 'link_name' => array('type' => 'varchar','precision' => '128'), 218 'version' => array('type' => 'varchar','precision' => '30','nullable' => False,'default' => '0.0.0.0'), 219 'content' => array('type' => 'longtext') 220 ) 221 )); 222 } 223 224 $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.5.1.0'; 225 return $GLOBALS['setup_info']['phpgwapi']['currentver']; 226 } 196 227 ?>
Note: See TracChangeset
for help on using the changeset viewer.