mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-19 06:51:33 +02:00
[ticket/11700] Fix installation after develop merge
PHPBB3-11700
This commit is contained in:
73
phpBB/phpbb/db/migration/data/v310/auth_provider_oauth.php
Normal file
73
phpBB/phpbb/db/migration/data/v310/auth_provider_oauth.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package migration
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v310;
|
||||
|
||||
class auth_provider_oauth extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return $this->db_tools->sql_table_exists($this->table_prefix . 'auth_provider_oauth');
|
||||
}
|
||||
|
||||
public function update_schema()
|
||||
{
|
||||
return array(
|
||||
'add_tables' => array(
|
||||
$this->table_prefix . 'oauth_tokens' => array(
|
||||
'COLUMNS' => array(
|
||||
'user_id' => array('UINT', 0), // phpbb_users.user_id
|
||||
'session_id' => array('CHAR:32', ''), // phpbb_sessions.session_id used only when user_id not set
|
||||
'provider' => array('VCHAR', ''), // Name of the OAuth provider
|
||||
'oauth_token' => array('MTEXT', ''), // Serialized token
|
||||
),
|
||||
'KEYS' => array(
|
||||
'user_id' => array('INDEX', 'user_id'),
|
||||
'provider' => array('INDEX', 'provider'),
|
||||
),
|
||||
),
|
||||
$this->table_prefix . 'oauth_accounts' => array(
|
||||
'COLUMNS' => array(
|
||||
'user_id' => array('UINT', 0),
|
||||
'provider' => array('VCHAR', ''),
|
||||
'oauth_provider_id' => array('TEXT_UNI', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => array(
|
||||
'user_id',
|
||||
'provider',
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
public function revert_schema()
|
||||
{
|
||||
return array(
|
||||
'drop_tables' => array(
|
||||
$this->table_prefix . 'oauth_tokens',
|
||||
$this->table_prefix . 'oauth_accounts',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('module.add', array(
|
||||
'ucp',
|
||||
'UCP_PROFILE',
|
||||
array(
|
||||
'module_basename' => 'ucp_auth_link',
|
||||
'modes' => array('auth_link'),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
27
phpBB/phpbb/db/migration/data/v310/mod_rewrite.php
Normal file
27
phpBB/phpbb/db/migration/data/v310/mod_rewrite.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package migration
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v310;
|
||||
|
||||
class mod_rewrite extends \phpbb\db\migration\migration
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\phpbb\db\migration\data\v310\dev',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.add', array('enable_mod_rewrite', '0')),
|
||||
);
|
||||
}
|
||||
}
|
27
phpBB/phpbb/db/migration/data/v310/notifications_cron.php
Normal file
27
phpBB/phpbb/db/migration/data/v310/notifications_cron.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 extends \phpbb\db\migration\migration
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('\phpbb\db\migration\data\v310\notifications');
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.add', array('read_notification_expire_days', 30)),
|
||||
array('config.add', array('read_notification_last_gc', 0)), // last run
|
||||
array('config.add', array('read_notification_gc', (60 * 60 * 24))), // seconds between run; 1 day
|
||||
);
|
||||
}
|
||||
}
|
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package migration
|
||||
* @copyright (c) 2013 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v310;
|
||||
|
||||
class softdelete_mcp_modules extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
$sql = 'SELECT module_id
|
||||
FROM ' . MODULES_TABLE . "
|
||||
WHERE module_class = 'mcp'
|
||||
AND module_basename = 'mcp_queue'
|
||||
AND module_mode = 'deleted_topics'";
|
||||
$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',
|
||||
'phpbb\db\migration\data\v310\softdelete_p2',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('module.add', array(
|
||||
'mcp',
|
||||
'MCP_QUEUE',
|
||||
array(
|
||||
'module_basename' => 'mcp_queue',
|
||||
'modes' => array('deleted_topics'),
|
||||
),
|
||||
)),
|
||||
array('module.add', array(
|
||||
'mcp',
|
||||
'MCP_QUEUE',
|
||||
array(
|
||||
'module_basename' => 'mcp_queue',
|
||||
'modes' => array('deleted_posts'),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user