1
0

UserStore.migrations 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. :VERSION 1
  2. BEGIN TRANSACTION;
  3. -- users table
  4. CREATE TABLE users(
  5. UUID varchar(255) primary key,
  6. username varchar(255),
  7. surname varchar(255),
  8. passwordHash varchar(255),
  9. passwordSalt varchar(255),
  10. homeRegionX integer,
  11. homeRegionY integer,
  12. homeLocationX float,
  13. homeLocationY float,
  14. homeLocationZ float,
  15. homeLookAtX float,
  16. homeLookAtY float,
  17. homeLookAtZ float,
  18. created integer,
  19. lastLogin integer,
  20. rootInventoryFolderID varchar(255),
  21. userInventoryURI varchar(255),
  22. userAssetURI varchar(255),
  23. profileCanDoMask integer,
  24. profileWantDoMask integer,
  25. profileAboutText varchar(255),
  26. profileFirstText varchar(255),
  27. profileImage varchar(255),
  28. profileFirstImage varchar(255),
  29. webLoginKey text default '00000000-0000-0000-0000-000000000000');
  30. -- friends table
  31. CREATE TABLE userfriends(
  32. ownerID varchar(255),
  33. friendID varchar(255),
  34. friendPerms integer,
  35. ownerPerms integer,
  36. datetimestamp integer);
  37. COMMIT;
  38. :VERSION 2
  39. BEGIN;
  40. ALTER TABLE users add homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
  41. COMMIT;
  42. :VERSION 3
  43. BEGIN;
  44. ALTER TABLE users add userFlags integer NOT NULL default 0;
  45. ALTER TABLE users add godLevel integer NOT NULL default 0;
  46. COMMIT;
  47. :VERSION 4
  48. BEGIN;
  49. ALTER TABLE users add customType varchar(32) not null default '';
  50. ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000';
  51. COMMIT;
  52. :VERSION 5
  53. BEGIN;
  54. CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `attachpoint` int(11) NOT NULL DEFAULT 0, `item` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `asset` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000');
  55. COMMIT;
  56. :VERSION 6
  57. BEGIN TRANSACTION;
  58. -- usersagents table
  59. CREATE TABLE IF NOT EXISTS useragents(
  60. UUID varchar(255) primary key,
  61. agentIP varchar(255),
  62. agentPort integer,
  63. agentOnline boolean,
  64. sessionID varchar(255),
  65. secureSessionID varchar(255),
  66. regionID varchar(255),
  67. loginTime integer,
  68. logoutTime integer,
  69. currentRegion varchar(255),
  70. currentHandle varchar(255),
  71. currentPosX float,
  72. currentPosY float,
  73. currentPosZ float);
  74. COMMIT;
  75. :VERSION 7
  76. BEGIN TRANSACTION;
  77. ALTER TABLE useragents add currentLookAtX float not null default 128;
  78. ALTER TABLE useragents add currentLookAtY float not null default 128;
  79. ALTER TABLE useragents add currentLookAtZ float not null default 70;
  80. COMMIT;
  81. :VERSION 8
  82. BEGIN TRANSACTION;
  83. ALTER TABLE users add email varchar(250);
  84. COMMIT;
  85. :VERSION 9
  86. BEGIN;
  87. update users
  88. set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
  89. where UUID not like '%-%';
  90. update useragents
  91. set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
  92. where UUID not like '%-%';
  93. COMMIT;
  94. :VERSION 10
  95. BEGIN TRANSACTION;
  96. CREATE TABLE IF NOT EXISTS avatarappearance(
  97. Owner varchar(36) NOT NULL primary key,
  98. BodyItem varchar(36) DEFAULT NULL,
  99. BodyAsset varchar(36) DEFAULT NULL,
  100. SkinItem varchar(36) DEFAULT NULL,
  101. SkinAsset varchar(36) DEFAULT NULL,
  102. HairItem varchar(36) DEFAULT NULL,
  103. HairAsset varchar(36) DEFAULT NULL,
  104. EyesItem varchar(36) DEFAULT NULL,
  105. EyesAsset varchar(36) DEFAULT NULL,
  106. ShirtItem varchar(36) DEFAULT NULL,
  107. ShirtAsset varchar(36) DEFAULT NULL,
  108. PantsItem varchar(36) DEFAULT NULL,
  109. PantsAsset varchar(36) DEFAULT NULL,
  110. ShoesItem varchar(36) DEFAULT NULL,
  111. ShoesAsset varchar(36) DEFAULT NULL,
  112. SocksItem varchar(36) DEFAULT NULL,
  113. SocksAsset varchar(36) DEFAULT NULL,
  114. JacketItem varchar(36) DEFAULT NULL,
  115. JacketAsset varchar(36) DEFAULT NULL,
  116. GlovesItem varchar(36) DEFAULT NULL,
  117. GlovesAsset varchar(36) DEFAULT NULL,
  118. UnderShirtItem varchar(36) DEFAULT NULL,
  119. UnderShirtAsset varchar(36) DEFAULT NULL,
  120. UnderPantsItem varchar(36) DEFAULT NULL,
  121. UnderPantsAsset varchar(36) DEFAULT NULL,
  122. SkirtItem varchar(36) DEFAULT NULL,
  123. SkirtAsset varchar(36) DEFAULT NULL,
  124. Texture blob,
  125. VisualParams blob,
  126. Serial int DEFAULT NULL,
  127. AvatarHeight float DEFAULT NULL
  128. );
  129. COMMIT;