Skip to content

Commit

Permalink
Merge pull request #37 from owncloud/oracle_fixes
Browse files Browse the repository at this point in the history
oracle_fixes
  • Loading branch information
butonic committed Jul 8, 2013
2 parents 3ef9f73 + 626598a commit 2176267
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MDB2/Driver/Manager/oci8.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ function _dropAutoincrement($table)
return $db;
}

$table = strtoupper($table);
$table_uppercase = strtoupper($table);
$trigger_name = $table . '_AI_PK';
$trigger_name_quoted = $db->quote($trigger_name, 'text');
$query = 'SELECT trigger_name FROM user_triggers';
Expand All @@ -293,7 +293,7 @@ function _dropAutoincrement($table)
}

if ($trigger) {
$trigger_name = $db->quoteIdentifier($table . '_AI_PK', true);
$trigger_name = $db->quoteIdentifier($trigger, true);
$trigger_sql = 'DROP TRIGGER ' . $trigger_name;
$result = $db->exec($trigger_sql);
if (PEAR::isError($result)) {
Expand All @@ -307,7 +307,7 @@ function _dropAutoincrement($table)
'sequence for autoincrement PK could not be dropped', __FUNCTION__);
}

$index_name = $table . '_AI_PK';
$index_name = $table_uppercase . '_AI_PK';
$idxname_format = $db->getOption('idxname_format');
$db->setOption('idxname_format', '%s');
$result1 = $this->dropConstraint($table, $index_name);
Expand Down

0 comments on commit 2176267

Please sign in to comment.