Skip to content

Instantly share code, notes, and snippets.

@ViskoB
Last active November 7, 2015 19:27
Show Gist options
  • Save ViskoB/038a003ec829e3379b69 to your computer and use it in GitHub Desktop.
Save ViskoB/038a003ec829e3379b69 to your computer and use it in GitHub Desktop.
GW2 TS3 Authentication - Table
CREATE TABLE IF NOT EXISTS `ts3auth` (
`ts3_uniqueid` varchar(250) NOT NULL,
`gw2_name` varchar(250) NOT NULL,
`gw2_refresh` varchar(250) NOT NULL,
`gw2_apikey` varchar(250) NOT NULL,
`gw2_world` int(11) NOT NULL,
`last_check` datetime NOT NULL,
`dbsessionhash` varchar(250) NOT NULL,
`type` varchar(20) NOT NULL DEFAULT 'oauth',
`keyname` varchar(250) NOT NULL DEFAULT '',
PRIMARY KEY (`ts3_uniqueid`),
UNIQUE KEY `ts3_uniqueid` (`ts3_uniqueid`)
);
-- Updates the table if you used the older OAuth version. These will fail if it was created above but that can be ignored.
ALTER TABLE `ts3auth` ADD `gw2_apikey` varchar(250) NOT NULL;
ALTER TABLE `ts3auth` ADD `type` varchar(20) NOT NULL DEFAULT 'oauth';
ALTER TABLE `ts3auth` ADD `keyname` varchar(250) NOT NULL DEFAULT '';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment