This repository has been archived by the owner on Apr 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modifications to PDO storage handler
- Loading branch information
Showing
3 changed files
with
63 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CREATE TABLE `%s` | ||
( | ||
`uid` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`userID` int(10) unsigned NOT NULL, | ||
`token` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, | ||
PRIMARY KEY (`uid`), | ||
UNIQUE KEY `userID` (`userID`) | ||
) | ||
ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; |
This file was deleted.
Oops, something went wrong.
d407b7c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PDO storage handler will now create the table for OAuth tokens. The default table name has changed which will cause issues for users who are already storing tokens in the old
oauth_tokens
table and not calling\Dropbox\OAuth\Storage\PDO::setTable()
. There are 2 possible fixes that resolve this:The first is to call
\Dropbox\OAuth\Storage\PDO::setTable()
, passing 'oauth_tokens' as the table name.The second is to use the new default table,
dropbox_oauth_tokens
(or using a table with another name, setting it using the previously mentioned method), and importing the OAuth tokens already stored inoauth_tokens
.Sorry for any inconvenience caused, but this makes the library a lot more flexible going forward.