[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7194] API: add index on acl
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7194] API: add index on acl |
Date: |
Thu, 07 Apr 2011 11:49:48 +0000 |
Revision: 7194
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7194
Author: sigurdne
Date: 2011-04-07 11:49:47 +0000 (Thu, 07 Apr 2011)
Log Message:
-----------
API: add index on acl
Modified Paths:
--------------
trunk/phpgwapi/setup/setup.inc.php
trunk/phpgwapi/setup/tables_update.inc.php
Modified: trunk/phpgwapi/setup/setup.inc.php
===================================================================
--- trunk/phpgwapi/setup/setup.inc.php 2011-04-07 08:46:54 UTC (rev 7193)
+++ trunk/phpgwapi/setup/setup.inc.php 2011-04-07 11:49:47 UTC (rev 7194)
@@ -12,7 +12,7 @@
// Basic information about this app
$setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'phpgwapi';
- $setup_info['phpgwapi']['version'] = '0.9.17.533';
+ $setup_info['phpgwapi']['version'] = '0.9.17.534';
$setup_info['phpgwapi']['versions']['current_header'] = '1.31';
$setup_info['phpgwapi']['versions']['system'] = '1.0';
$setup_info['phpgwapi']['enable'] = 3;
Modified: trunk/phpgwapi/setup/tables_update.inc.php
===================================================================
--- trunk/phpgwapi/setup/tables_update.inc.php 2011-04-07 08:46:54 UTC (rev
7193)
+++ trunk/phpgwapi/setup/tables_update.inc.php 2011-04-07 11:49:47 UTC (rev
7194)
@@ -2898,3 +2898,38 @@
}
}
+ $test[] = '0.9.17.533';
+ /**
+ * Add index to acl
+ *
+ * @return string the new version number
+ */
+ function phpgwapi_upgrade0_9_17_533()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+ if($GLOBALS['phpgw_info']['server']['db_type'] == 'postgres')
+ {
+ $create_index = true;
+ $metadata =
$GLOBALS['phpgw']->db->metaindexes('phpgw_acl');
+
+ foreach($metadata as $index_name => $index)
+ {
+ if(preg_match('/^location_id/i', $index_name))
+ {
+ $create_index = false;
+ }
+ }
+
+ if($create_index)
+ {
+ $GLOBALS['phpgw_setup']->oProc->query("CREATE
INDEX location_id_phpgw_acl_idx ON phpgw_acl USING btree (location_id)");
+ $GLOBALS['phpgw_setup']->oProc->query("REINDEX
TABLE phpgw_acl");
+ }
+ }
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['phpgwapi']['currentver'] =
'0.9.17.534';
+ return $GLOBALS['setup_info']['phpgwapi']['currentver'];
+ }
+ }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7194] API: add index on acl,
Sigurd Nes <=