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.

56 lines
2.0 KiB

8 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. `created_by` int(10) unsigned DEFAULT NULL,
  13. `created_at` datetime DEFAULT NULL,
  14. PRIMARY KEY (`id`)
  15. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
  16. CREATE TABLE `users` (
  17. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  18. `url` varchar(255) DEFAULT NULL,
  19. `name` varchar(255) DEFAULT NULL,
  20. `photo` varchar(255) DEFAULT NULL,
  21. `created_at` datetime DEFAULT NULL,
  22. `last_login` datetime DEFAULT NULL,
  23. PRIMARY KEY (`id`)
  24. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;
  25. CREATE TABLE `webmention_status` (
  26. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  27. `webmention_id` bigint(20) unsigned DEFAULT NULL,
  28. `created_at` datetime DEFAULT NULL,
  29. `http_code` int(11) DEFAULT NULL,
  30. `status` varchar(100) DEFAULT NULL,
  31. `raw_response` text,
  32. PRIMARY KEY (`id`),
  33. KEY `webmention_id` (`webmention_id`,`created_at`)
  34. ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4;
  35. CREATE TABLE `webmentions` (
  36. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  37. `site_id` int(10) unsigned NOT NULL,
  38. `token` varchar(20) DEFAULT NULL,
  39. `created_by` int(10) unsigned DEFAULT NULL,
  40. `created_at` datetime DEFAULT NULL,
  41. `complete` tinyint(4) NOT NULL DEFAULT '0',
  42. `source` varchar(255) DEFAULT NULL,
  43. `target` varchar(255) DEFAULT NULL,
  44. `vouch` varchar(255) DEFAULT NULL,
  45. `callback` varchar(255) DEFAULT NULL,
  46. `webmention_endpoint` varchar(255) DEFAULT NULL,
  47. `webmention_status_url` varchar(255) DEFAULT NULL,
  48. `pingback_endpoint` varchar(255) DEFAULT NULL,
  49. PRIMARY KEY (`id`),
  50. KEY `token` (`token`),
  51. KEY `site_id` (`site_id`)
  52. ) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb4;