From e60f4bc88b32465b1d31049f2eb14b1793747dc6 Mon Sep 17 00:00:00 2001
From: Joseph Warner <hardolaf@hardolaf.com>
Date: Tue, 23 Jul 2013 22:15:53 -0400
Subject: [feature/oauth] Finalize schema changes

PHPBB3-11673
---
 phpBB/install/schemas/postgres_schema.sql | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

(limited to 'phpBB/install/schemas/postgres_schema.sql')

diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index c7fbe9a507..4b8f8f61e1 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -188,6 +188,30 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
 CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
 CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
 
+/*
+	Table: 'phpbb_oauth_tokens'
+*/
+CREATE TABLE phpbb_oauth_tokens (
+	user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+	session_id char(32) DEFAULT '' NOT NULL,
+	provider varchar(255) NOT NULL,
+	oauth_token varchar(4000) NOT NULL
+);
+
+CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
+CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (oauth_provider);
+
+/*
+	Table: 'phpbb_oauth_accounts'
+*/
+CREATE TABLE phpbb_oauth_accounts (
+	user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+	provider varchar(255) NOT NULL,
+	oauth_provider_id varchar(4000) NOT NULL,
+	PRIMARY KEY (user_id, provider)
+);
+
+
 /*
 	Table: 'phpbb_banlist'
 */
-- 
cgit v1.2.1


From 2483efe9a34df48a82bcceff5f966881fea2a37e Mon Sep 17 00:00:00 2001
From: Joseph Warner <hardolaf@hardolaf.com>
Date: Tue, 23 Jul 2013 22:18:41 -0400
Subject: [feature/oauth] Actual final schema changes

PHPBB3-11673
---
 phpBB/install/schemas/postgres_schema.sql | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'phpBB/install/schemas/postgres_schema.sql')

diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 4b8f8f61e1..135cd23fb8 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -194,8 +194,8 @@ CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
 CREATE TABLE phpbb_oauth_tokens (
 	user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
 	session_id char(32) DEFAULT '' NOT NULL,
-	provider varchar(255) NOT NULL,
-	oauth_token varchar(4000) NOT NULL
+	provider varchar(255) DEFAULT '' NOT NULL,
+	oauth_token varchar(4000) DEFAULT '' NOT NULL
 );
 
 CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
@@ -206,8 +206,8 @@ CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (oauth_provider);
 */
 CREATE TABLE phpbb_oauth_accounts (
 	user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
-	provider varchar(255) NOT NULL,
-	oauth_provider_id varchar(4000) NOT NULL,
+	provider varchar(255) DEFAULT '' NOT NULL,
+	oauth_provider_id varchar(4000) DEFAULT '' NOT NULL,
 	PRIMARY KEY (user_id, provider)
 );
 
-- 
cgit v1.2.1


From da6a8787f8443ea02f405a913aa5d0721034f819 Mon Sep 17 00:00:00 2001
From: Joseph Warner <hardolaf@hardolaf.com>
Date: Tue, 23 Jul 2013 22:26:22 -0400
Subject: [feature/oauth] Fix SQL error found in install

PHPBB3-11673
---
 phpBB/install/schemas/postgres_schema.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'phpBB/install/schemas/postgres_schema.sql')

diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 135cd23fb8..f64f4981d5 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -199,7 +199,7 @@ CREATE TABLE phpbb_oauth_tokens (
 );
 
 CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
-CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (oauth_provider);
+CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider);
 
 /*
 	Table: 'phpbb_oauth_accounts'
-- 
cgit v1.2.1


From c33f97038675c7ca79c8cbb0ece08c989f411c9b Mon Sep 17 00:00:00 2001
From: Joseph Warner <hardolaf@hardolaf.com>
Date: Wed, 31 Jul 2013 16:50:19 -0400
Subject: [feature/oauth] Forgot to update schema files

PHPBB3-11673
---
 phpBB/install/schemas/postgres_schema.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'phpBB/install/schemas/postgres_schema.sql')

diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index f64f4981d5..14435898eb 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -195,7 +195,7 @@ CREATE TABLE phpbb_oauth_tokens (
 	user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
 	session_id char(32) DEFAULT '' NOT NULL,
 	provider varchar(255) DEFAULT '' NOT NULL,
-	oauth_token varchar(4000) DEFAULT '' NOT NULL
+	oauth_token TEXT DEFAULT '' NOT NULL
 );
 
 CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
-- 
cgit v1.2.1

