[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc class.schema_proc_pgsql.inc.php,1.
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.schema_proc_pgsql.inc.php,1.5,1.6 |
Date: |
Wed, 30 Apr 2003 07:07:26 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv6638
Modified Files:
class.schema_proc_pgsql.inc.php
Log Message:
fixed schema_proc for pgSql to properly rename a table, if forgot to rename the
index
Index: class.schema_proc_pgsql.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.schema_proc_pgsql.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.schema_proc_pgsql.inc.php 22 Mar 2003 01:28:48 -0000 1.5
--- class.schema_proc_pgsql.inc.php 30 Apr 2003 11:07:24 -0000 1.6
***************
*** 518,524 ****
$indexes[] = $val['index_name'];
}
! if(!in_array($sOldTableName . '_pkey',$indexes))
{
$oProc->m_odb->query("DROP INDEX " .
$sOldTableName . "_pkey",__LINE__,__FILE__);
}
--- 518,528 ----
$indexes[] = $val['index_name'];
}
! if(!in_array($sOldTableName . '_pkey',$indexes))
// no idea how this can happen
{
$oProc->m_odb->query("DROP INDEX " .
$sOldTableName . "_pkey",__LINE__,__FILE__);
+ }
+ else // rename the index
+ {
+ $oProc->m_odb->query('ALTER TABLE
'.$sOldTableName.'_pkey RENAME TO '.$sNewTableName.'_pkey');
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.schema_proc_pgsql.inc.php,1.5,1.6,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/inc class.sopricebook.inc.php,1.6,1.7 class.uipricebook.inc.php,1.10,1.11
- Next by Date:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.schema_proc_pgsql.inc.php,1.5.2.1,1.5.2.2
- Previous by thread:
[Phpgroupware-cvs] CVS: property/inc class.sopricebook.inc.php,1.6,1.7 class.uipricebook.inc.php,1.10,1.11
- Next by thread:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.schema_proc_pgsql.inc.php,1.5.2.1,1.5.2.2
- Index(es):