Presence.migrations 727 B

12345678910111213141516171819202122232425262728293031
  1. :VERSION 1 # --------------------------
  2. BEGIN;
  3. CREATE TABLE `Presence` (
  4. `UserID` VARCHAR(255) NOT NULL,
  5. `RegionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
  6. `SessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
  7. `SecureSessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'
  8. ) ENGINE=InnoDB;
  9. CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
  10. CREATE INDEX UserID ON Presence(UserID);
  11. COMMIT;
  12. :VERSION 2 # --------------------------
  13. BEGIN;
  14. ALTER TABLE `Presence` ADD COLUMN LastSeen timestamp;
  15. COMMIT;
  16. :VERSION 3 # --------------------------
  17. BEGIN;
  18. CREATE INDEX RegionID ON Presence(RegionID);
  19. COMMIT;