mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/10214] Correct Oracle create table query syntax in db_tools
Removes the semicolon at end of oracle CREATE TABLE queries and adds a semicolon to the end of a SELECT query inside of the trigger for a new table's auto increment column before the end keyword PHPBB3-10214
This commit is contained in:
parent
7cc45ee0d5
commit
c090e1c9e9
2 changed files with 4 additions and 4 deletions
|
@ -543,7 +543,7 @@ class phpbb_db_tools
|
|||
break;
|
||||
|
||||
case 'oracle':
|
||||
$table_sql .= "\n);";
|
||||
$table_sql .= "\n)";
|
||||
$statements[] = $table_sql;
|
||||
|
||||
// do we need to add a sequence and a tigger for auto incrementing columns?
|
||||
|
@ -561,7 +561,7 @@ class phpbb_db_tools
|
|||
$trigger .= "BEGIN\n";
|
||||
$trigger .= "\tSELECT {$table_name}_seq.nextval\n";
|
||||
$trigger .= "\tINTO :new.{$create_sequence}\n";
|
||||
$trigger .= "\tFROM dual\n";
|
||||
$trigger .= "\tFROM dual;\n";
|
||||
$trigger .= "END;";
|
||||
|
||||
$statements[] = $trigger;
|
||||
|
|
|
@ -2484,7 +2484,7 @@ class updater_db_tools
|
|||
break;
|
||||
|
||||
case 'oracle':
|
||||
$table_sql .= "\n);";
|
||||
$table_sql .= "\n)";
|
||||
$statements[] = $table_sql;
|
||||
|
||||
// do we need to add a sequence and a tigger for auto incrementing columns?
|
||||
|
@ -2502,7 +2502,7 @@ class updater_db_tools
|
|||
$trigger .= "BEGIN\n";
|
||||
$trigger .= "\tSELECT {$table_name}_seq.nextval\n";
|
||||
$trigger .= "\tINTO :new.{$create_sequence}\n";
|
||||
$trigger .= "\tFROM dual\n";
|
||||
$trigger .= "\tFROM dual;\n";
|
||||
$trigger .= "END;";
|
||||
|
||||
$statements[] = $trigger;
|
||||
|
|
Loading…
Add table
Reference in a new issue