mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 23:07:39 +02: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:
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
|
* The Column types for every database we support
|
||||||
* @var array
|
* @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(
|
'mysql_41' => array(
|
||||||
'INT:' => 'int(%d)',
|
'INT:' => 'int(%d)',
|
||||||
'BINT' => 'bigint(20)',
|
'BINT' => 'bigint(20)',
|
||||||
@@ -278,6 +287,7 @@ class phpbb_db_tools
|
|||||||
'VARBINARY' => 'bytea',
|
'VARBINARY' => 'bytea',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of types being unsigned for better reference in some db's
|
* 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->db = $db;
|
||||||
$this->return_statements = $return_statements;
|
$this->return_statements = $return_statements;
|
||||||
|
|
||||||
|
$this->dbms_type_map = self::get_dbms_type_map();
|
||||||
|
|
||||||
// Determine mapping database type
|
// Determine mapping database type
|
||||||
switch ($this->db->sql_layer)
|
switch ($this->db->sql_layer)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user