mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/11755] MySQL upgrader out of date
De-duplicating code from create_schema_files, mysql_upgrader. New file phpbb/db/schema_data which contains all the current schema data. New function in db_tools public static function get_dbms_type_map() to make the type map available everywhere (without requiring $db be setup already) PHPBB3-11755
This commit is contained in:
parent
5ddb0ba629
commit
536eeb7afa
4 changed files with 1447 additions and 2777 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
1194
phpBB/phpbb/db/schema_data.php
Normal file
1194
phpBB/phpbb/db/schema_data.php
Normal file
File diff suppressed because it is too large
Load diff
|
@ -37,7 +37,16 @@ class phpbb_db_tools
|
|||
* The Column types for every database we support
|
||||
* @var array
|
||||
*/
|
||||
var $dbms_type_map = array(
|
||||
var $dbms_type_map = array();
|
||||
|
||||
/**
|
||||
* Get the column types for every database we support
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function get_dbms_type_map()
|
||||
{
|
||||
return array(
|
||||
'mysql_41' => array(
|
||||
'INT:' => 'int(%d)',
|
||||
'BINT' => 'bigint(20)',
|
||||
|
@ -278,6 +287,7 @@ class phpbb_db_tools
|
|||
'VARBINARY' => 'bytea',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A list of types being unsigned for better reference in some db's
|
||||
|
@ -308,6 +318,8 @@ class phpbb_db_tools
|
|||
$this->db = $db;
|
||||
$this->return_statements = $return_statements;
|
||||
|
||||
$this->dbms_type_map = self::get_dbms_type_map();
|
||||
|
||||
// Determine mapping database type
|
||||
switch ($this->db->sql_layer)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue