GoScrobble/migrations/8_oauth.up.sql
Daniel Mason 9866dea36b
0.0.11
- Fix redirects to /login for auth required pages
- Add handling for 401/429 + No connection responses in API calls
- Add background workers for Go (clear out password resets)
- Fixed timezone issues
2021-04-02 22:24:00 +13:00

11 lines
444 B
SQL

CREATE TABLE IF NOT EXISTS `oauth_tokens` (
`user` BINARY(16),
`service` VARCHAR(64) NOT NULL,
`access_token` VARCHAR(255) NULL DEFAULT '',
`refresh_token` VARCHAR(255) NULL DEFAULT '',
`expiry` DATETIME NOT NULL,
`username` VARCHAR(100) NULL DEFAULT '',
`last_synced` DATETIME NOT NULL DEFAULT NOW(),
PRIMARY KEY `userService` (`user`, `service`)
) DEFAULT CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci;