1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

Viewtopic:

- PGSQL friendly

New Install:
- file_get_contents

New/Old Install:
- remove remarks for PGSQL, some versions don't like 'em
- fixed the regex in remove_remarks
- rewrote split_sql_file

Schema:
- removed explicit inserts, replaced with implicit inserts. This is more friendly to our non auto incrementing friends. (One set of data is not fixed yet, the modules table)
- removed all those SELECT SETVAL statements, they were not needed.


git-svn-id: file:///svn/phpbb/trunk@5854 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M
2006-04-28 02:18:17 +00:00
parent 5994371c0a
commit 1b065fb74a
6 changed files with 142 additions and 203 deletions

View File

@@ -1086,7 +1086,7 @@ if ($stage == 3)
$delimiter = $available_dbms[$dbms]['DELIM'];
$sql_query = @fread(@fopen($dbms_schema, 'r'), @filesize($dbms_schema));
$sql_query = preg_replace('#phpbb_#is', $table_prefix, $sql_query);
$sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
$remove_remarks($sql_query);
@@ -1116,6 +1116,8 @@ if ($stage == 3)
case 'postgres':
$sql_query = preg_replace('#\# POSTGRES (BEGIN|COMMIT) \##s', '\1; ', $sql_query);
// Some versions of PGSQL don't like remarks, lets remove them.
remove_remarks($sql_query);
break;
case 'firebird':
@@ -1130,7 +1132,7 @@ if ($stage == 3)
//$sql_query = preg_replace('#\# MSSQL IDENTITY (phpbb_[a-z_]+) (ON|OFF) \##s', '', $sql_query);
}
$sql_query = preg_replace('#phpbb_#', $table_prefix, $sql_query);
$sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
remove_remarks($sql_query);
$sql_query = split_sql_file($sql_query, ';');