A corporation manager and dashboard for EVE Online
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

schema_campaigns.sql 1.5 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. -- Schema for Calefaction's Campaign module's internal database
  2. DROP TABLE IF EXISTS last_updated;
  3. CREATE TABLE last_updated (
  4. lu_campaign TEXT,
  5. lu_operation TEXT,
  6. lu_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  7. lu_key INTEGER DEFAULT NULL,
  8. UNIQUE (lu_campaign, lu_operation)
  9. );
  10. DROP TABLE IF EXISTS overview;
  11. CREATE TABLE overview (
  12. ov_campaign TEXT,
  13. ov_operation TEXT,
  14. ov_primary INTEGER DEFAULT 0,
  15. ov_secondary REAL DEFAULT NULL,
  16. UNIQUE (ov_campaign, ov_operation)
  17. );
  18. DROP TABLE IF EXISTS kill;
  19. CREATE TABLE kill (
  20. kill_id INTEGER PRIMARY KEY,
  21. kill_date TIMESTAMP,
  22. kill_system INTEGER,
  23. kill_victim_shipid INTEGER,
  24. kill_victim_charid INTEGER,
  25. kill_victim_charname TEXT,
  26. kill_victim_corpid INTEGER,
  27. kill_victim_corpname TEXT,
  28. kill_victim_allianceid INTEGER,
  29. kill_victim_alliancename TEXT,
  30. kill_victim_factionid INTEGER,
  31. kill_victim_factionname TEXT,
  32. kill_value REAL
  33. );
  34. DROP TABLE IF EXISTS oper_kill;
  35. CREATE TABLE oper_kill (
  36. ok_campaign TEXT,
  37. ok_operation TEXT,
  38. ok_killid INTEGER,
  39. UNIQUE (ok_campaign, ok_operation, ok_killid),
  40. FOREIGN KEY (ok_killid) REFERENCES kill (kill_id)
  41. ON DELETE CASCADE ON UPDATE CASCADE
  42. );
  43. CREATE INDEX ok_campaign_operation ON oper_kill (ok_campaign, ok_operation);
  44. CREATE INDEX ok_campaign_killid ON oper_kill (ok_campaign, ok_killid);
  45. DROP TABLE IF EXISTS oper_item;
  46. CREATE TABLE oper_item (
  47. oi_campaign TEXT,
  48. oi_operation TEXT
  49. -- ...
  50. -- UNIQUE (oi_campaign, oi_operation, ...)
  51. );