1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-05 05:02:44 +01:00
phorge-phorge/resources/sql/patches/107.oauthserver.sql
Joshua Spence 6270114767 Various linter fixes.
Summary:
- Removed trailing newlines.
- Added newline at EOF.
- Removed leading newlines.
- Trimmed trailing whitespace.
- Spelling fix.
- Added newline at EOF

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: hach-que, chad, Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D8344
2014-02-26 12:44:58 -08:00

48 lines
1.8 KiB
SQL

CREATE TABLE `{$NAMESPACE}_oauth_server`.`oauth_server_oauthserverclient` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`phid` varchar(64) BINARY NOT NULL,
`name` varchar(255) NOT NULL,
`secret` varchar(32) NOT NULL,
`redirectURI` varchar(255) NOT NULL,
`creatorPHID` varchar(64) BINARY NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `phid` (`phid`)
) ENGINE=InnoDB;
CREATE TABLE `{$NAMESPACE}_oauth_server`.`oauth_server_oauthclientauthorization` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`phid` varchar(64) BINARY NOT NULL,
`userPHID` varchar(64) BINARY NOT NULL,
`clientPHID` varchar(64) BINARY NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `phid` (`phid`),
UNIQUE KEY `userPHID` (`userPHID`,`clientPHID`)
) ENGINE=InnoDB;
CREATE TABLE `{$NAMESPACE}_oauth_server`.`oauth_server_oauthserverauthorizationcode` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(32) NOT NULL,
`clientPHID` varchar(64) BINARY NOT NULL,
`clientSecret` varchar(32) NOT NULL,
`userPHID` varchar(64) BINARY NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB;
CREATE TABLE `{$NAMESPACE}_oauth_server`.`oauth_server_oauthserveraccesstoken` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`token` varchar(32) NOT NULL,
`userPHID` varchar(64) BINARY NOT NULL,
`clientPHID` varchar(64) BINARY NOT NULL,
`dateExpires` int(10) unsigned NOT NULL,
`dateCreated` int(10) unsigned NOT NULL,
`dateModified` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `token` (`token`)
) ENGINE=InnoDB;