The storage system and conversion tools for the new Logs website.
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.

42 lines
1.3 KiB

  1. CREATE TABLE IF NOT EXISTS `logheader` (
  2. `id` CHAR(64) NOT NULL PRIMARY KEY,
  3. `channel` CHAR(32) NOT NULL,
  4. `status` CHAR(8) NOT NULL,
  5. `status_time` DATETIME NOT NULL,
  6. `time` DATETIME NOT NULL,
  7. `title` VARCHAR(255),
  8. `tag` VARCHAR(255),
  9. `description` TEXT
  10. ) ENGINE=innodb CHARSET=utf8;
  11. CREATE TABLE IF NOT EXISTS `logpost` (
  12. `id` CHAR(24) NOT NULL PRIMARY KEY,
  13. `nick` CHAR(32) NOT NULL,
  14. `type` CHAR(8) NOT NULL,
  15. `time` DATETIME NOT NULL,
  16. `messages` TEXT NOT NULL,
  17. `text` TEXT NOT NULL
  18. ) ENGINE=innodb CHARSET=utf8;
  19. CREATE TABLE IF NOT EXISTS `lognicks` (
  20. `log_id` CHAR(64) NOT NULL,
  21. `nick` CHAR(32) NOT NULL,
  22. PRIMARY KEY (`log_id`, `nick`),
  23. FOREIGN KEY (`log_id`) REFERENCES logheader(id) ON DELETE CASCADE
  24. ) ENGINE=innodb CHARSET=utf8;
  25. CREATE TABLE IF NOT EXISTS `rpchar` (
  26. `nick` CHAR(32) NOT NULL PRIMARY KEY,
  27. `type` CHAR(4) NOT NULL,
  28. `name` VARCHAR(255) NOT NULL,
  29. `short_name` VARCHAR(255) NOT NULL,
  30. `bio_url` VARCHAR(255),
  31. `about` TEXT
  32. ) ENGINE=innodb CHARSET=utf8;
  33. CREATE TABLE IF NOT EXISTS `altnick` (
  34. `nick` CHAR(32) NOT NULL PRIMARY KEY,
  35. `main_nick` CHAR(32) NOT NULL,
  36. FOREIGN KEY (`main_nick`) REFERENCES rpchar(nick) ON DELETE CASCADE
  37. ) ENGINE=innodb CHARSET=utf8;