mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
try and avoid naming conflicts so put _idx on the end of all postgres indexes
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@667 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
parent
78c2f03df0
commit
dadb8094da
@ -229,7 +229,7 @@ function _add_index($table, $indexname, $fieldlist) {
|
||||
if ($CONF['database_type'] == 'mysql' || $CONF['database_type'] == 'mysqli' ) {
|
||||
return "ALTER TABLE $table ADD INDEX `$indexname` ( `$fieldlist` )";
|
||||
} elseif($CONF['database_type'] == 'pgsql') {
|
||||
$pgindexname = $table . "_" . $indexname;
|
||||
$pgindexname = $table . "_" . $indexname . '_idx';
|
||||
return "CREATE INDEX $pgindexname ON $table($fieldlist);"; # Index names are unique with a DB for PostgreSQL
|
||||
} else {
|
||||
echo "Sorry, unsupported database type " . $conf['database_type'];
|
||||
|
Loading…
Reference in New Issue
Block a user