Single-sign-on and self-serve account management. https://netsyms.biz/apps/accounthub
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. CREATE TABLE IF NOT EXISTS `onetimekeys` (
  2. `key` VARCHAR(10) NOT NULL,
  3. `uid` INT(11) NOT NULL,
  4. `expires` DATETIME NOT NULL,
  5. INDEX `fk_onetimekeys_accounts1_idx` (`uid` ASC),
  6. PRIMARY KEY (`key`),
  7. UNIQUE INDEX `key_UNIQUE` (`key` ASC),
  8. CONSTRAINT `fk_onetimekeys_accounts1`
  9. FOREIGN KEY (`uid`)
  10. REFERENCES `accounthub`.`accounts` (`uid`)
  11. ON DELETE NO ACTION
  12. ON UPDATE NO ACTION)
  13. ENGINE = InnoDB
  14. DEFAULT CHARACTER SET = utf8;
  15. CREATE TABLE IF NOT EXISTS `notifications` (
  16. `notificationid` INT NOT NULL AUTO_INCREMENT,
  17. `uid` INT NOT NULL,
  18. `timestamp` DATETIME NOT NULL,
  19. `title` VARCHAR(255) NOT NULL,
  20. `content` TINYTEXT NOT NULL,
  21. `url` VARCHAR(255) NOT NULL,
  22. `seen` TINYINT(1) NOT NULL DEFAULT 0,
  23. `sensitive` TINYINT(1) NOT NULL,
  24. `appid` VARCHAR(255) NULL,
  25. PRIMARY KEY (`notificationid`, `uid`),
  26. UNIQUE INDEX `notificationid_UNIQUE` (`notificationid` ASC),
  27. INDEX `fk_notifications_accounts1_idx` (`uid` ASC),
  28. CONSTRAINT `fk_notifications_accounts1`
  29. FOREIGN KEY (`uid`)
  30. REFERENCES `accounts` (`uid`)
  31. ON DELETE NO ACTION
  32. ON UPDATE NO ACTION)
  33. ENGINE = InnoDB
  34. DEFAULT CHARACTER SET = utf8;
  35. SET FOREIGN_KEY_CHECKS = 0;
  36. ALTER TABLE `groups`
  37. CHANGE COLUMN `groupid` `groupid` INT(11) NOT NULL AUTO_INCREMENT;
  38. SET FOREIGN_KEY_CHECKS = 1;
  39. ALTER TABLE `accounts`
  40. ADD COLUMN `pin` VARCHAR(10) NULL DEFAULT NULL AFTER `authsecret`;
  41. ALTER TABLE `mobile_codes`
  42. CHANGE COLUMN `code` `code` VARCHAR(45) NOT NULL DEFAULT '',
  43. ADD COLUMN `description` VARCHAR(255) NOT NULL DEFAULT '' AFTER `code`;
  44. INSERT INTO `permissions` (`permid`, `permcode`, `perminfo`) VALUES (400, 'SITEWRITER', 'Manage and edit websites, messages, and analytics');
  45. INSERT INTO `permissions` (`permid`, `permcode`, `perminfo`) VALUES (401, 'SITEWRITER_CONTACT', 'Manage messages sent via website contact forms');
  46. INSERT INTO `permissions` (`permid`, `permcode`, `perminfo`) VALUES (402, 'SITEWRITER_ANALYTICS', 'View website analytics');
  47. INSERT INTO `permissions` (`permid`, `permcode`, `perminfo`) VALUES (403, 'SITEWRITER_EDIT', 'Edit website content');
  48. INSERT INTO `permissions` (`permid`, `permcode`, `perminfo`) VALUES (404, 'SITEWRITER_FILES', 'Manage and upload files');