IM_Store.migrations 838 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. :VERSION 1 # --------------------------
  2. BEGIN;
  3. CREATE TABLE `im_offline` (
  4. `ID` MEDIUMINT NOT NULL AUTO_INCREMENT,
  5. `PrincipalID` char(36) NOT NULL default '',
  6. `Message` text NOT NULL,
  7. `TMStamp` timestamp NOT NULL,
  8. PRIMARY KEY (`ID`),
  9. KEY `PrincipalID` (`PrincipalID`)
  10. ) ENGINE=MyISAM;
  11. COMMIT;
  12. :VERSION 2 # --------------------------
  13. BEGIN;
  14. INSERT INTO `im_offline` SELECT * from `diva_im_offline`;
  15. DROP TABLE `diva_im_offline`;
  16. DELETE FROM `migrations` WHERE name='diva_im_Store';
  17. COMMIT;
  18. :VERSION 3 # --------------------------
  19. BEGIN;
  20. ALTER TABLE `im_offline`
  21. ADD `FromID` char(36) NOT NULL default '' AFTER `PrincipalID`,
  22. ADD KEY `FromID` (`FromID`);
  23. COMMIT;
  24. :VERSION 4 # --------------------------
  25. BEGIN;
  26. ALTER TABLE im_offline CONVERT TO CHARACTER SET utf8;
  27. COMMIT;