1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[feature/oauth] Move last file to appropriate location

PHPBB3-11673
This commit is contained in:
Joseph Warner
2013-07-14 14:17:54 -04:00
parent a43a8f8c72
commit 00d0e10200

View File

@@ -0,0 +1,45 @@
<?php
/**
*
* @package migration
* @copyright (c) 2013 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
*
*/
class phpbb_db_migration_data_310_auth_provider_oauth extends phpbb_db_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 . 'auth_provider_oauth' => 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
'oauth_provider' => array('VCHAR'), // Name of the OAuth provider
'oauth_token' => array('TEXT_UNI'), // Serialized token
),
'KEYS' => array(
'user_id' => array('INDEX', 'user_id'),
'oauth_provider' => array('INDEX', 'oauth_provider'),
),
),
),
);
}
public function revert_schema()
{
return array(
'drop_tables' => array(
$this->table_prefix . 'auth_provider_oauth',
),
);
}
}