aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-07-13 16:51:38 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-07-14 14:22:42 -0400
commit24bf333e161332ddd589831228e35ad9eb1e8f18 (patch)
tree1f75cd05e829dd8e59c93c5dca914fea3b97a95a /phpBB/includes/db
parent37f099b014ea34378096c50cf898c060bd3f0d42 (diff)
downloadforums-24bf333e161332ddd589831228e35ad9eb1e8f18.tar
forums-24bf333e161332ddd589831228e35ad9eb1e8f18.tar.gz
forums-24bf333e161332ddd589831228e35ad9eb1e8f18.tar.bz2
forums-24bf333e161332ddd589831228e35ad9eb1e8f18.tar.xz
forums-24bf333e161332ddd589831228e35ad9eb1e8f18.zip
[feature/oauth] Use DB for OAuth token storage
PHPBB3-11673
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r--phpBB/includes/db/migration/data/310/auth_provider_oauth.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/phpBB/includes/db/migration/data/310/auth_provider_oauth.php b/phpBB/includes/db/migration/data/310/auth_provider_oauth.php
new file mode 100644
index 0000000000..6239cf97bc
--- /dev/null
+++ b/phpBB/includes/db/migration/data/310/auth_provider_oauth.php
@@ -0,0 +1,42 @@
+<?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
+ 'oauth_provider' => array('VCHAR'), // Name of the OAuth provider
+ 'oauth_token' => array('TEXT_UNI'), // Serialized token
+ ),
+ 'PRIMARY_KEY' => array('user_id', 'oauth_provider'),
+ ),
+ ),
+
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'auth_provider_oauth',
+ ),
+ );
+ }
+}