Single-sign-on and self-serve account management. https://netsyms.biz/apps/accounthub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.5KB

  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. SET FOREIGN_KEY_CHECKS = 0;
  16. ALTER TABLE `groups`
  17. CHANGE COLUMN `groupid` `groupid` INT(11) NOT NULL AUTO_INCREMENT;
  18. SET FOREIGN_KEY_CHECKS = 1;
  19. ALTER TABLE `accounts`
  20. ADD COLUMN `pin` VARCHAR(10) NULL DEFAULT NULL AFTER `authsecret`;
  21. ALTER TABLE `mobile_codes`
  22. CHANGE COLUMN `code` `code` VARCHAR(45) NOT NULL DEFAULT '',
  23. ADD COLUMN `description` VARCHAR(255) NOT NULL DEFAULT '' AFTER `code`;
  24. INSERT INTO `permissions` (`permid`, `permcode`, `perminfo`) VALUES (400, 'SITEWRITER', 'Manage and edit websites, messages, and analytics');
  25. INSERT INTO `permissions` (`permid`, `permcode`, `perminfo`) VALUES (401, 'SITEWRITER_CONTACT', 'Manage messages sent via website contact forms');
  26. INSERT INTO `permissions` (`permid`, `permcode`, `perminfo`) VALUES (402, 'SITEWRITER_ANALYTICS', 'View website analytics');
  27. INSERT INTO `permissions` (`permid`, `permcode`, `perminfo`) VALUES (403, 'SITEWRITER_EDIT', 'Edit website content');
  28. INSERT INTO `permissions` (`permid`, `permcode`, `perminfo`) VALUES (404, 'SITEWRITER_FILES', 'Manage and upload files');