1
0

AuthStore.migrations 695 B

123456789101112131415161718192021222324
  1. :VERSION 4 # -------------------------------
  2. begin;
  3. CREATE TABLE IF NOT EXISTS `auth` (
  4. `UUID` char(36) NOT NULL,
  5. `passwordHash` char(32) NOT NULL DEFAULT '',
  6. `passwordSalt` char(32) NOT NULL DEFAULT '',
  7. `webLoginKey` varchar(255) NOT NULL DEFAULT '',
  8. `accountType` varchar(32) NOT NULL DEFAULT 'UserAccount',
  9. PRIMARY KEY (`UUID`)
  10. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  11. CREATE TABLE IF NOT EXISTS `tokens` (
  12. `UUID` char(36) NOT NULL,
  13. `token` varchar(255) NOT NULL,
  14. `validity` datetime NOT NULL,
  15. UNIQUE KEY `uuid_token` (`UUID`,`token`),
  16. KEY `UUID` (`UUID`),
  17. KEY `token` (`token`),
  18. KEY `validity` (`validity`)
  19. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  20. COMMIT;