aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migration/migration.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/db/migration/migration.php')
-rw-r--r--phpBB/phpbb/db/migration/migration.php28
1 files changed, 15 insertions, 13 deletions
diff --git a/phpBB/phpbb/db/migration/migration.php b/phpBB/phpbb/db/migration/migration.php
index b32de00871..2304c8e44c 100644
--- a/phpBB/phpbb/db/migration/migration.php
+++ b/phpBB/phpbb/db/migration/migration.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package db
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -15,18 +19,16 @@ namespace phpbb\db\migration;
* Each migration consists of a set of schema and data changes to be implemented
* in a subclass. This class provides various utility methods to simplify editing
* a phpBB.
-*
-* @package db
*/
abstract class migration
{
/** @var \phpbb\config\config */
protected $config;
- /** @var \phpbb\db\driver\driver */
+ /** @var \phpbb\db\driver\driver_interface */
protected $db;
- /** @var \phpbb\db\tools */
+ /** @var \phpbb\db\tools\tools_interface */
protected $db_tools;
/** @var string */
@@ -48,13 +50,13 @@ abstract class migration
* Constructor
*
* @param \phpbb\config\config $config
- * @param \phpbb\db\driver\driver $db
- * @param \phpbb\db\tools $db_tools
+ * @param \phpbb\db\driver\driver_interface $db
+ * @param \phpbb\db\tools\tools_interface $db_tools
* @param string $phpbb_root_path
* @param string $php_ext
* @param string $table_prefix
*/
- public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\db\tools $db_tools, $phpbb_root_path, $php_ext, $table_prefix)
+ public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\db\tools\tools_interface $db_tools, $phpbb_root_path, $php_ext, $table_prefix)
{
$this->config = $config;
$this->db = $db;
@@ -158,11 +160,11 @@ abstract class migration
else
{
$result = $this->db->sql_query($sql);
- if ($this->db->sql_error_triggered)
+ if ($this->db->get_sql_error_triggered())
{
$this->errors[] = array(
- 'sql' => $this->db->sql_error_sql,
- 'code' => $this->db->sql_error_returned,
+ 'sql' => $this->db->get_sql_error_sql(),
+ 'code' => $this->db->get_sql_error_returned(),
);
}
}