1
0

UserStore.migrations 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. :VERSION 1 # -----------------------------
  2. BEGIN;
  3. SET FOREIGN_KEY_CHECKS=0;
  4. -- ----------------------------
  5. -- Table structure for agents
  6. -- ----------------------------
  7. CREATE TABLE `agents` (
  8. `UUID` varchar(36) NOT NULL,
  9. `sessionID` varchar(36) NOT NULL,
  10. `secureSessionID` varchar(36) NOT NULL,
  11. `agentIP` varchar(16) NOT NULL,
  12. `agentPort` int(11) NOT NULL,
  13. `agentOnline` tinyint(4) NOT NULL,
  14. `loginTime` int(11) NOT NULL,
  15. `logoutTime` int(11) NOT NULL,
  16. `currentRegion` varchar(36) NOT NULL,
  17. `currentHandle` bigint(20) unsigned NOT NULL,
  18. `currentPos` varchar(64) NOT NULL,
  19. PRIMARY KEY (`UUID`),
  20. UNIQUE KEY `session` (`sessionID`),
  21. UNIQUE KEY `ssession` (`secureSessionID`)
  22. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  23. -- Create schema avatar_appearance
  24. --
  25. CREATE TABLE `avatarappearance` (
  26. Owner char(36) NOT NULL,
  27. Serial int(10) unsigned NOT NULL,
  28. Visual_Params blob NOT NULL,
  29. Texture blob NOT NULL,
  30. Avatar_Height float NOT NULL,
  31. Body_Item char(36) NOT NULL,
  32. Body_Asset char(36) NOT NULL,
  33. Skin_Item char(36) NOT NULL,
  34. Skin_Asset char(36) NOT NULL,
  35. Hair_Item char(36) NOT NULL,
  36. Hair_Asset char(36) NOT NULL,
  37. Eyes_Item char(36) NOT NULL,
  38. Eyes_Asset char(36) NOT NULL,
  39. Shirt_Item char(36) NOT NULL,
  40. Shirt_Asset char(36) NOT NULL,
  41. Pants_Item char(36) NOT NULL,
  42. Pants_Asset char(36) NOT NULL,
  43. Shoes_Item char(36) NOT NULL,
  44. Shoes_Asset char(36) NOT NULL,
  45. Socks_Item char(36) NOT NULL,
  46. Socks_Asset char(36) NOT NULL,
  47. Jacket_Item char(36) NOT NULL,
  48. Jacket_Asset char(36) NOT NULL,
  49. Gloves_Item char(36) NOT NULL,
  50. Gloves_Asset char(36) NOT NULL,
  51. Undershirt_Item char(36) NOT NULL,
  52. Undershirt_Asset char(36) NOT NULL,
  53. Underpants_Item char(36) NOT NULL,
  54. Underpants_Asset char(36) NOT NULL,
  55. Skirt_Item char(36) NOT NULL,
  56. Skirt_Asset char(36) NOT NULL,
  57. PRIMARY KEY (`Owner`)
  58. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  59. SET FOREIGN_KEY_CHECKS=0;
  60. -- ----------------------------
  61. -- Table structure for users
  62. -- ----------------------------
  63. CREATE TABLE `userfriends` (
  64. `ownerID` VARCHAR(37) NOT NULL,
  65. `friendID` VARCHAR(37) NOT NULL,
  66. `friendPerms` INT NOT NULL,
  67. `datetimestamp` INT NOT NULL,
  68. UNIQUE KEY (`ownerID`, `friendID`)
  69. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  70. -- ----------------------------
  71. -- Table structure for users
  72. -- ----------------------------
  73. CREATE TABLE `users` (
  74. `UUID` varchar(36) NOT NULL default '',
  75. `username` varchar(32) NOT NULL,
  76. `lastname` varchar(32) NOT NULL,
  77. `passwordHash` varchar(32) NOT NULL,
  78. `passwordSalt` varchar(32) NOT NULL,
  79. `homeRegion` bigint(20) unsigned default NULL,
  80. `homeLocationX` float default NULL,
  81. `homeLocationY` float default NULL,
  82. `homeLocationZ` float default NULL,
  83. `homeLookAtX` float default NULL,
  84. `homeLookAtY` float default NULL,
  85. `homeLookAtZ` float default NULL,
  86. `created` int(11) NOT NULL,
  87. `lastLogin` int(11) NOT NULL,
  88. `userInventoryURI` varchar(255) default NULL,
  89. `userAssetURI` varchar(255) default NULL,
  90. `profileCanDoMask` int(10) unsigned default NULL,
  91. `profileWantDoMask` int(10) unsigned default NULL,
  92. `profileAboutText` text,
  93. `profileFirstText` text,
  94. `profileImage` varchar(36) default NULL,
  95. `profileFirstImage` varchar(36) default NULL,
  96. `webLoginKey` varchar(36) default NULL,
  97. PRIMARY KEY (`UUID`),
  98. UNIQUE KEY `usernames` (`username`,`lastname`)
  99. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  100. -- ----------------------------
  101. -- Records
  102. -- ----------------------------
  103. COMMIT;
  104. :VERSION 2 # -----------------------------
  105. BEGIN;
  106. ALTER TABLE users add homeRegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
  107. COMMIT;
  108. :VERSION 3 # -----------------------------
  109. BEGIN;
  110. ALTER TABLE users add userFlags integer NOT NULL default 0;
  111. ALTER TABLE users add godLevel integer NOT NULL default 0;
  112. COMMIT;
  113. :VERSION 4 # -----------------------------
  114. BEGIN;
  115. ALTER TABLE users add customType varchar(32) not null default '';
  116. ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000';
  117. COMMIT;
  118. :VERSION 5 # -----------------------------
  119. BEGIN;
  120. CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL, `attachpoint` int(11) NOT NULL, `item` char(36) NOT NULL, `asset` char(36) NOT NULL) ENGINE=InnoDB;
  121. COMMIT;
  122. :VERSION 6 # -----------------------------
  123. BEGIN;
  124. ALTER TABLE agents add currentLookAt varchar(36) not null default '';
  125. COMMIT;
  126. :VERSION 7 # -----------------------------
  127. BEGIN;
  128. ALTER TABLE users add email varchar(250);
  129. COMMIT;
  130. :VERSION 8 # -----------------------------
  131. BEGIN;
  132. ALTER TABLE users add scopeID char(36) not null default '00000000-0000-0000-0000-000000000000';
  133. COMMIT;