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.

59 lines
2.1 KiB

9 years ago
9 years ago
9 years ago
  1. CREATE TABLE `roles` (
  2. `site_id` int(11) unsigned NOT NULL,
  3. `user_id` int(11) unsigned NOT NULL,
  4. `role` varchar(30) DEFAULT 'owner',
  5. `token` varchar(255) DEFAULT NULL,
  6. PRIMARY KEY (`site_id`,`user_id`),
  7. KEY `apikey` (`token`(191))
  8. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  9. CREATE TABLE `sites` (
  10. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  11. `name` varchar(255) DEFAULT NULL,
  12. `url` VARCHAR(255) DEFAULT NULL,
  13. `created_by` int(10) unsigned DEFAULT NULL,
  14. `created_at` datetime DEFAULT NULL,
  15. PRIMARY KEY (`id`)
  16. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
  17. CREATE TABLE `users` (
  18. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  19. `url` varchar(255) DEFAULT NULL,
  20. `name` varchar(255) DEFAULT NULL,
  21. `photo` varchar(255) DEFAULT NULL,
  22. `created_at` datetime DEFAULT NULL,
  23. `last_login` datetime DEFAULT NULL,
  24. PRIMARY KEY (`id`)
  25. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;
  26. CREATE TABLE `webmention_status` (
  27. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  28. `webmention_id` bigint(20) unsigned DEFAULT NULL,
  29. `created_at` datetime DEFAULT NULL,
  30. `http_code` int(11) DEFAULT NULL,
  31. `status` varchar(100) DEFAULT NULL,
  32. `raw_response` text,
  33. PRIMARY KEY (`id`),
  34. KEY `webmention_id` (`webmention_id`,`created_at`)
  35. ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4;
  36. CREATE TABLE `webmentions` (
  37. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  38. `site_id` int(10) unsigned NOT NULL,
  39. `token` varchar(20) DEFAULT NULL,
  40. `created_by` int(10) unsigned DEFAULT NULL,
  41. `created_at` datetime DEFAULT NULL,
  42. `complete` tinyint(4) NOT NULL DEFAULT '0',
  43. `source` varchar(255) DEFAULT NULL,
  44. `target` varchar(255) DEFAULT NULL,
  45. `vouch` varchar(255) DEFAULT NULL,
  46. `code` text DEFAULT NULL,
  47. `realm` text DEFAULT NULL,
  48. `callback` varchar(255) DEFAULT NULL,
  49. `webmention_endpoint` varchar(255) DEFAULT NULL,
  50. `webmention_status_url` varchar(255) DEFAULT NULL,
  51. `pingback_endpoint` varchar(255) DEFAULT NULL,
  52. PRIMARY KEY (`id`),
  53. KEY `token` (`token`),
  54. KEY `site_id` (`site_id`)
  55. ) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb4;