mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-13 12:14:06 +02:00
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into ticket/11842
Conflicts: phpBB/includes/acp/acp_groups.php
This commit is contained in:
28
phpBB/phpbb/db/migration/data/v310/alpha2.php
Normal file
28
phpBB/phpbb/db/migration/data/v310/alpha2.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package migration
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v310;
|
||||
|
||||
class alpha2 extends \phpbb\db\migration\migration
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\phpbb\db\migration\data\v310\alpha1',
|
||||
'\phpbb\db\migration\data\v310\notifications_cron_p2',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.update', array('version', '3.1.0-a2')),
|
||||
);
|
||||
}
|
||||
}
|
@@ -34,7 +34,7 @@ class notifications extends \phpbb\db\migration\migration
|
||||
),
|
||||
$this->table_prefix . 'notifications' => array(
|
||||
'COLUMNS' => array(
|
||||
'notification_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'notification_id' => array('UINT', null, 'auto_increment'),
|
||||
'item_type' => array('VCHAR:255', ''),
|
||||
'item_id' => array('UINT', 0),
|
||||
'item_parent_id' => array('UINT', 0),
|
||||
|
27
phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php
Normal file
27
phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package migration
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v310;
|
||||
|
||||
class notifications_cron_p2 extends \phpbb\db\migration\migration
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('\phpbb\db\migration\data\v310\notifications_cron');
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
// Make read_notification_last_gc dynamic.
|
||||
array('config.remove', array('read_notification_last_gc')),
|
||||
array('config.add', array('read_notification_last_gc', 0, 1)),
|
||||
);
|
||||
}
|
||||
}
|
@@ -26,7 +26,7 @@ class notifications_schema_fix extends \phpbb\db\migration\migration
|
||||
'add_tables' => array(
|
||||
$this->table_prefix . 'notification_types' => array(
|
||||
'COLUMNS' => array(
|
||||
'notification_type_id' => array('USINT', NULL, 'auto_increment'),
|
||||
'notification_type_id' => array('USINT', null, 'auto_increment'),
|
||||
'notification_type_name' => array('VCHAR:255', ''),
|
||||
'notification_type_enabled' => array('BOOL', 1),
|
||||
),
|
||||
@@ -37,7 +37,7 @@ class notifications_schema_fix extends \phpbb\db\migration\migration
|
||||
),
|
||||
$this->table_prefix . 'notifications' => array(
|
||||
'COLUMNS' => array(
|
||||
'notification_id' => array('UINT:10', NULL, 'auto_increment'),
|
||||
'notification_id' => array('UINT:10', null, 'auto_increment'),
|
||||
'notification_type_id' => array('USINT', 0),
|
||||
'item_id' => array('UINT', 0),
|
||||
'item_parent_id' => array('UINT', 0),
|
||||
@@ -73,7 +73,7 @@ class notifications_schema_fix extends \phpbb\db\migration\migration
|
||||
),
|
||||
$this->table_prefix . 'notifications' => array(
|
||||
'COLUMNS' => array(
|
||||
'notification_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'notification_id' => array('UINT', null, 'auto_increment'),
|
||||
'item_type' => array('VCHAR:255', ''),
|
||||
'item_id' => array('UINT', 0),
|
||||
'item_parent_id' => array('UINT', 0),
|
||||
|
@@ -34,7 +34,10 @@ class softdelete_p2 extends \phpbb\db\migration\migration
|
||||
),
|
||||
'drop_keys' => array(
|
||||
$this->table_prefix . 'posts' => array('post_approved'),
|
||||
$this->table_prefix . 'topics' => array('forum_appr_last'),
|
||||
$this->table_prefix . 'topics' => array(
|
||||
'forum_appr_last',
|
||||
'topic_approved',
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -63,6 +66,7 @@ class softdelete_p2 extends \phpbb\db\migration\migration
|
||||
),
|
||||
$this->table_prefix . 'topics' => array(
|
||||
'forum_appr_last' => array('forum_id', 'topic_approved', 'topic_last_post_id'),
|
||||
'topic_approved' => array('topic_approved'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@@ -24,6 +24,14 @@ class style_update_p2 extends \phpbb\db\migration\migration
|
||||
public function update_schema()
|
||||
{
|
||||
return array(
|
||||
'drop_keys' => array(
|
||||
$this->table_prefix . 'styles' => array(
|
||||
'imageset_id',
|
||||
'template_id',
|
||||
'theme_id',
|
||||
),
|
||||
),
|
||||
|
||||
'drop_columns' => array(
|
||||
$this->table_prefix . 'styles' => array(
|
||||
'imageset_id',
|
||||
@@ -53,10 +61,18 @@ class style_update_p2 extends \phpbb\db\migration\migration
|
||||
),
|
||||
),
|
||||
|
||||
'add_index' => array(
|
||||
$this->table_prefix . 'styles' => array(
|
||||
'imageset_id' => array('imageset_id'),
|
||||
'template_id' => array('template_id'),
|
||||
'theme_id' => array('theme_id'),
|
||||
),
|
||||
),
|
||||
|
||||
'add_tables' => array(
|
||||
$this->table_prefix . 'styles_imageset' => array(
|
||||
'COLUMNS' => array(
|
||||
'imageset_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'imageset_id' => array('UINT', null, 'auto_increment'),
|
||||
'imageset_name' => array('VCHAR_UNI:255', ''),
|
||||
'imageset_copyright' => array('VCHAR_UNI', ''),
|
||||
'imageset_path' => array('VCHAR:100', ''),
|
||||
@@ -68,7 +84,7 @@ class style_update_p2 extends \phpbb\db\migration\migration
|
||||
),
|
||||
$this->table_prefix . 'styles_imageset_data' => array(
|
||||
'COLUMNS' => array(
|
||||
'image_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'image_id' => array('UINT', null, 'auto_increment'),
|
||||
'image_name' => array('VCHAR:200', ''),
|
||||
'image_filename' => array('VCHAR:200', ''),
|
||||
'image_lang' => array('VCHAR:30', ''),
|
||||
@@ -83,7 +99,7 @@ class style_update_p2 extends \phpbb\db\migration\migration
|
||||
),
|
||||
$this->table_prefix . 'styles_template' => array(
|
||||
'COLUMNS' => array(
|
||||
'template_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'template_id' => array('UINT', null, 'auto_increment'),
|
||||
'template_name' => array('VCHAR_UNI:255', ''),
|
||||
'template_copyright' => array('VCHAR_UNI', ''),
|
||||
'template_path' => array('VCHAR:100', ''),
|
||||
@@ -112,7 +128,7 @@ class style_update_p2 extends \phpbb\db\migration\migration
|
||||
),
|
||||
$this->table_prefix . 'styles_theme' => array(
|
||||
'COLUMNS' => array(
|
||||
'theme_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'theme_id' => array('UINT', null, 'auto_increment'),
|
||||
'theme_name' => array('VCHAR_UNI:255', ''),
|
||||
'theme_copyright' => array('VCHAR_UNI', ''),
|
||||
'theme_path' => array('VCHAR:100', ''),
|
||||
|
@@ -27,7 +27,7 @@ class teampage extends \phpbb\db\migration\migration
|
||||
'add_tables' => array(
|
||||
$this->table_prefix . 'teampage' => array(
|
||||
'COLUMNS' => array(
|
||||
'teampage_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'teampage_id' => array('UINT', null, 'auto_increment'),
|
||||
'group_id' => array('UINT', 0),
|
||||
'teampage_name' => array('VCHAR_UNI:255', ''),
|
||||
'teampage_position' => array('UINT', 0),
|
||||
|
42
phpBB/phpbb/db/migration/data/v310/ucp_popuppm_module.php
Normal file
42
phpBB/phpbb/db/migration/data/v310/ucp_popuppm_module.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package migration
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v310;
|
||||
|
||||
class ucp_popuppm_module extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
$sql = 'SELECT module_id
|
||||
FROM ' . MODULES_TABLE . "
|
||||
WHERE module_class = 'ucp'
|
||||
AND module_langname = 'UCP_PM_POPUP_TITLE'";
|
||||
$result = $this->db->sql_query($sql);
|
||||
$module_id = $this->db->sql_fetchfield('module_id');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return $module_id == false;
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('\phpbb\db\migration\data\v310\dev');
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('module.remove', array(
|
||||
'ucp',
|
||||
'UCP_PM',
|
||||
'UCP_PM_POPUP_TITLE',
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
@@ -9,14 +9,6 @@
|
||||
|
||||
namespace phpbb\db\migration;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* The migrator is responsible for applying new migrations in the correct order.
|
||||
*
|
||||
|
@@ -9,14 +9,6 @@
|
||||
|
||||
namespace phpbb\db\migration;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract base class for database migrations
|
||||
*
|
||||
|
@@ -130,6 +130,10 @@ class config implements \phpbb\db\migration\tool\tool_interface
|
||||
|
||||
case 'remove':
|
||||
$call = 'add';
|
||||
if (sizeof($arguments) == 1)
|
||||
{
|
||||
$arguments[] = '';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'update_if_equals':
|
||||
|
Reference in New Issue
Block a user