001_AuthStore.sql 509 B

123456789101112131415161718192021
  1. begin;
  2. CREATE TABLE `auth` (
  3. `UUID` char(36) NOT NULL,
  4. `passwordHash` char(32) NOT NULL default '',
  5. `passwordSalt` char(32) NOT NULL default '',
  6. `webLoginKey` varchar(255) NOT NULL default '',
  7. PRIMARY KEY (`UUID`)
  8. ) ENGINE=InnoDB;
  9. CREATE TABLE `tokens` (
  10. `UUID` char(36) NOT NULL,
  11. `token` varchar(255) NOT NULL,
  12. `validity` datetime NOT NULL,
  13. UNIQUE KEY `uuid_token` (`UUID`,`token`),
  14. KEY `UUID` (`UUID`),
  15. KEY `token` (`token`),
  16. KEY `validity` (`validity`)
  17. ) ENGINE=InnoDB;
  18. commit;