RegionStore.migrations 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
  1. 
  2. :VERSION 1 #---------------------
  3. BEGIN;
  4. CREATE TABLE `prims` (
  5. `UUID` varchar(255) NOT NULL,
  6. `RegionUUID` varchar(255) default NULL,
  7. `ParentID` int(11) default NULL,
  8. `CreationDate` int(11) default NULL,
  9. `Name` varchar(255) default NULL,
  10. `SceneGroupID` varchar(255) default NULL,
  11. `Text` varchar(255) default NULL,
  12. `Description` varchar(255) default NULL,
  13. `SitName` varchar(255) default NULL,
  14. `TouchName` varchar(255) default NULL,
  15. `ObjectFlags` int(11) default NULL,
  16. `CreatorID` varchar(255) default NULL,
  17. `OwnerID` varchar(255) default NULL,
  18. `GroupID` varchar(255) default NULL,
  19. `LastOwnerID` varchar(255) default NULL,
  20. `OwnerMask` int(11) default NULL,
  21. `NextOwnerMask` int(11) default NULL,
  22. `GroupMask` int(11) default NULL,
  23. `EveryoneMask` int(11) default NULL,
  24. `BaseMask` int(11) default NULL,
  25. `PositionX` float default NULL,
  26. `PositionY` float default NULL,
  27. `PositionZ` float default NULL,
  28. `GroupPositionX` float default NULL,
  29. `GroupPositionY` float default NULL,
  30. `GroupPositionZ` float default NULL,
  31. `VelocityX` float default NULL,
  32. `VelocityY` float default NULL,
  33. `VelocityZ` float default NULL,
  34. `AngularVelocityX` float default NULL,
  35. `AngularVelocityY` float default NULL,
  36. `AngularVelocityZ` float default NULL,
  37. `AccelerationX` float default NULL,
  38. `AccelerationY` float default NULL,
  39. `AccelerationZ` float default NULL,
  40. `RotationX` float default NULL,
  41. `RotationY` float default NULL,
  42. `RotationZ` float default NULL,
  43. `RotationW` float default NULL,
  44. `SitTargetOffsetX` float default NULL,
  45. `SitTargetOffsetY` float default NULL,
  46. `SitTargetOffsetZ` float default NULL,
  47. `SitTargetOrientW` float default NULL,
  48. `SitTargetOrientX` float default NULL,
  49. `SitTargetOrientY` float default NULL,
  50. `SitTargetOrientZ` float default NULL,
  51. PRIMARY KEY (`UUID`)
  52. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  53. CREATE TABLE `primshapes` (
  54. `UUID` varchar(255) NOT NULL,
  55. `Shape` int(11) default NULL,
  56. `ScaleX` float default NULL,
  57. `ScaleY` float default NULL,
  58. `ScaleZ` float default NULL,
  59. `PCode` int(11) default NULL,
  60. `PathBegin` int(11) default NULL,
  61. `PathEnd` int(11) default NULL,
  62. `PathScaleX` int(11) default NULL,
  63. `PathScaleY` int(11) default NULL,
  64. `PathShearX` int(11) default NULL,
  65. `PathShearY` int(11) default NULL,
  66. `PathSkew` int(11) default NULL,
  67. `PathCurve` int(11) default NULL,
  68. `PathRadiusOffset` int(11) default NULL,
  69. `PathRevolutions` int(11) default NULL,
  70. `PathTaperX` int(11) default NULL,
  71. `PathTaperY` int(11) default NULL,
  72. `PathTwist` int(11) default NULL,
  73. `PathTwistBegin` int(11) default NULL,
  74. `ProfileBegin` int(11) default NULL,
  75. `ProfileEnd` int(11) default NULL,
  76. `ProfileCurve` int(11) default NULL,
  77. `ProfileHollow` int(11) default NULL,
  78. `State` int(11) default NULL,
  79. `Texture` longblob,
  80. `ExtraParams` longblob,
  81. PRIMARY KEY (`UUID`)
  82. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  83. CREATE TABLE `primitems` (
  84. `itemID` varchar(255) NOT NULL,
  85. `primID` varchar(255) default NULL,
  86. `assetID` varchar(255) default NULL,
  87. `parentFolderID` varchar(255) default NULL,
  88. `invType` int(11) default NULL,
  89. `assetType` int(11) default NULL,
  90. `name` varchar(255) default NULL,
  91. `description` varchar(255) default NULL,
  92. `creationDate` bigint(20) default NULL,
  93. `creatorID` varchar(255) default NULL,
  94. `ownerID` varchar(255) default NULL,
  95. `lastOwnerID` varchar(255) default NULL,
  96. `groupID` varchar(255) default NULL,
  97. `nextPermissions` int(11) default NULL,
  98. `currentPermissions` int(11) default NULL,
  99. `basePermissions` int(11) default NULL,
  100. `everyonePermissions` int(11) default NULL,
  101. `groupPermissions` int(11) default NULL,
  102. PRIMARY KEY (`itemID`)
  103. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  104. CREATE TABLE `terrain` (
  105. `RegionUUID` varchar(255) default NULL,
  106. `Revision` int(11) default NULL,
  107. `Heightfield` longblob
  108. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  109. CREATE TABLE `land` (
  110. `UUID` varchar(255) NOT NULL,
  111. `RegionUUID` varchar(255) default NULL,
  112. `LocalLandID` int(11) default NULL,
  113. `Bitmap` longblob,
  114. `Name` varchar(255) default NULL,
  115. `Description` varchar(255) default NULL,
  116. `OwnerUUID` varchar(255) default NULL,
  117. `IsGroupOwned` int(11) default NULL,
  118. `Area` int(11) default NULL,
  119. `AuctionID` int(11) default NULL,
  120. `Category` int(11) default NULL,
  121. `ClaimDate` int(11) default NULL,
  122. `ClaimPrice` int(11) default NULL,
  123. `GroupUUID` varchar(255) default NULL,
  124. `SalePrice` int(11) default NULL,
  125. `LandStatus` int(11) default NULL,
  126. `LandFlags` int(11) default NULL,
  127. `LandingType` int(11) default NULL,
  128. `MediaAutoScale` int(11) default NULL,
  129. `MediaTextureUUID` varchar(255) default NULL,
  130. `MediaURL` varchar(255) default NULL,
  131. `MusicURL` varchar(255) default NULL,
  132. `PassHours` float default NULL,
  133. `PassPrice` int(11) default NULL,
  134. `SnapshotUUID` varchar(255) default NULL,
  135. `UserLocationX` float default NULL,
  136. `UserLocationY` float default NULL,
  137. `UserLocationZ` float default NULL,
  138. `UserLookAtX` float default NULL,
  139. `UserLookAtY` float default NULL,
  140. `UserLookAtZ` float default NULL,
  141. `AuthbuyerID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
  142. PRIMARY KEY (`UUID`)
  143. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  144. CREATE TABLE `landaccesslist` (
  145. `LandUUID` varchar(255) default NULL,
  146. `AccessUUID` varchar(255) default NULL,
  147. `Flags` int(11) default NULL
  148. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  149. COMMIT;
  150. :VERSION 2 #---------------------
  151. BEGIN;
  152. CREATE index prims_regionuuid on prims(RegionUUID);
  153. CREATE index primitems_primid on primitems(primID);
  154. COMMIT;
  155. :VERSION 3 #---------------------
  156. BEGIN;
  157. CREATE TABLE regionban (regionUUID VARCHAR(36) NOT NULL, bannedUUID VARCHAR(36) NOT NULL, bannedIp VARCHAR(16) NOT NULL, bannedIpHostMask VARCHAR(16) NOT NULL) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
  158. COMMIT;
  159. :VERSION 4 #---------------------
  160. BEGIN;
  161. ALTER TABLE primitems add flags integer not null default 0;
  162. COMMIT;
  163. :VERSION 5 #---------------------
  164. BEGIN;
  165. create table regionsettings (
  166. regionUUID char(36) not null,
  167. block_terraform integer not null,
  168. block_fly integer not null,
  169. allow_damage integer not null,
  170. restrict_pushing integer not null,
  171. allow_land_resell integer not null,
  172. allow_land_join_divide integer not null,
  173. block_show_in_search integer not null,
  174. agent_limit integer not null,
  175. object_bonus float not null,
  176. maturity integer not null,
  177. disable_scripts integer not null,
  178. disable_collisions integer not null,
  179. disable_physics integer not null,
  180. terrain_texture_1 char(36) not null,
  181. terrain_texture_2 char(36) not null,
  182. terrain_texture_3 char(36) not null,
  183. terrain_texture_4 char(36) not null,
  184. elevation_1_nw float not null,
  185. elevation_2_nw float not null,
  186. elevation_1_ne float not null,
  187. elevation_2_ne float not null,
  188. elevation_1_se float not null,
  189. elevation_2_se float not null,
  190. elevation_1_sw float not null,
  191. elevation_2_sw float not null,
  192. water_height float not null,
  193. terrain_raise_limit float not null,
  194. terrain_lower_limit float not null,
  195. use_estate_sun integer not null,
  196. fixed_sun integer not null,
  197. sun_position float not null,
  198. covenant char(36),
  199. primary key(regionUUID)
  200. );
  201. COMMIT;
  202. :VERSION 6 #---------------------
  203. BEGIN;
  204. alter table landaccesslist ENGINE = InnoDB;
  205. alter table migrations ENGINE = InnoDB;
  206. alter table primitems ENGINE = InnoDB;
  207. alter table prims ENGINE = InnoDB;
  208. alter table primshapes ENGINE = InnoDB;
  209. alter table regionsettings ENGINE = InnoDB;
  210. alter table terrain ENGINE = InnoDB;
  211. COMMIT;
  212. :VERSION 7 #---------------------
  213. BEGIN;
  214. ALTER TABLE prims change UUID UUIDold varchar(255);
  215. ALTER TABLE prims change RegionUUID RegionUUIDold varchar(255);
  216. ALTER TABLE prims change CreatorID CreatorIDold varchar(255);
  217. ALTER TABLE prims change OwnerID OwnerIDold varchar(255);
  218. ALTER TABLE prims change GroupID GroupIDold varchar(255);
  219. ALTER TABLE prims change LastOwnerID LastOwnerIDold varchar(255);
  220. ALTER TABLE prims add UUID char(36);
  221. ALTER TABLE prims add RegionUUID char(36);
  222. ALTER TABLE prims add CreatorID char(36);
  223. ALTER TABLE prims add OwnerID char(36);
  224. ALTER TABLE prims add GroupID char(36);
  225. ALTER TABLE prims add LastOwnerID char(36);
  226. UPDATE prims set UUID = UUIDold, RegionUUID = RegionUUIDold, CreatorID = CreatorIDold, OwnerID = OwnerIDold, GroupID = GroupIDold, LastOwnerID = LastOwnerIDold;
  227. ALTER TABLE prims drop UUIDold;
  228. ALTER TABLE prims drop RegionUUIDold;
  229. ALTER TABLE prims drop CreatorIDold;
  230. ALTER TABLE prims drop OwnerIDold;
  231. ALTER TABLE prims drop GroupIDold;
  232. ALTER TABLE prims drop LastOwnerIDold;
  233. ALTER TABLE prims add constraint primary key(UUID);
  234. ALTER TABLE prims add index prims_regionuuid(RegionUUID);
  235. COMMIT;
  236. :VERSION 8 #---------------------
  237. BEGIN;
  238. ALTER TABLE primshapes change UUID UUIDold varchar(255);
  239. ALTER TABLE primshapes add UUID char(36);
  240. UPDATE primshapes set UUID = UUIDold;
  241. ALTER TABLE primshapes drop UUIDold;
  242. ALTER TABLE primshapes add constraint primary key(UUID);
  243. COMMIT;
  244. :VERSION 9 #---------------------
  245. BEGIN;
  246. ALTER TABLE primitems change itemID itemIDold varchar(255);
  247. ALTER TABLE primitems change primID primIDold varchar(255);
  248. ALTER TABLE primitems change assetID assetIDold varchar(255);
  249. ALTER TABLE primitems change parentFolderID parentFolderIDold varchar(255);
  250. ALTER TABLE primitems change creatorID creatorIDold varchar(255);
  251. ALTER TABLE primitems change ownerID ownerIDold varchar(255);
  252. ALTER TABLE primitems change groupID groupIDold varchar(255);
  253. ALTER TABLE primitems change lastOwnerID lastOwnerIDold varchar(255);
  254. ALTER TABLE primitems add itemID char(36);
  255. ALTER TABLE primitems add primID char(36);
  256. ALTER TABLE primitems add assetID char(36);
  257. ALTER TABLE primitems add parentFolderID char(36);
  258. ALTER TABLE primitems add creatorID char(36);
  259. ALTER TABLE primitems add ownerID char(36);
  260. ALTER TABLE primitems add groupID char(36);
  261. ALTER TABLE primitems add lastOwnerID char(36);
  262. UPDATE primitems set itemID = itemIDold, primID = primIDold, assetID = assetIDold, parentFolderID = parentFolderIDold, creatorID = creatorIDold, ownerID = ownerIDold, groupID = groupIDold, lastOwnerID = lastOwnerIDold;
  263. ALTER TABLE primitems drop itemIDold;
  264. ALTER TABLE primitems drop primIDold;
  265. ALTER TABLE primitems drop assetIDold;
  266. ALTER TABLE primitems drop parentFolderIDold;
  267. ALTER TABLE primitems drop creatorIDold;
  268. ALTER TABLE primitems drop ownerIDold;
  269. ALTER TABLE primitems drop groupIDold;
  270. ALTER TABLE primitems drop lastOwnerIDold;
  271. ALTER TABLE primitems add constraint primary key(itemID);
  272. ALTER TABLE primitems add index primitems_primid(primID);
  273. COMMIT;
  274. :VERSION 10 #---------------------
  275. # 1 "010_RegionStore.sql"
  276. # 1 "<built-in>"
  277. # 1 "<command line>"
  278. # 1 "010_RegionStore.sql"
  279. BEGIN;
  280. DELETE FROM regionsettings;
  281. COMMIT;
  282. :VERSION 11 #---------------------
  283. BEGIN;
  284. ALTER TABLE prims change SceneGroupID SceneGroupIDold varchar(255);
  285. ALTER TABLE prims add SceneGroupID char(36);
  286. UPDATE prims set SceneGroupID = SceneGroupIDold;
  287. ALTER TABLE prims drop SceneGroupIDold;
  288. ALTER TABLE prims add index prims_scenegroupid(SceneGroupID);
  289. COMMIT;
  290. :VERSION 12 #---------------------
  291. BEGIN;
  292. ALTER TABLE prims add index prims_parentid(ParentID);
  293. COMMIT;
  294. :VERSION 13 #---------------------
  295. begin;
  296. drop table regionsettings;
  297. CREATE TABLE `regionsettings` (
  298. `regionUUID` char(36) NOT NULL,
  299. `block_terraform` int(11) NOT NULL,
  300. `block_fly` int(11) NOT NULL,
  301. `allow_damage` int(11) NOT NULL,
  302. `restrict_pushing` int(11) NOT NULL,
  303. `allow_land_resell` int(11) NOT NULL,
  304. `allow_land_join_divide` int(11) NOT NULL,
  305. `block_show_in_search` int(11) NOT NULL,
  306. `agent_limit` int(11) NOT NULL,
  307. `object_bonus` float NOT NULL,
  308. `maturity` int(11) NOT NULL,
  309. `disable_scripts` int(11) NOT NULL,
  310. `disable_collisions` int(11) NOT NULL,
  311. `disable_physics` int(11) NOT NULL,
  312. `terrain_texture_1` char(36) NOT NULL,
  313. `terrain_texture_2` char(36) NOT NULL,
  314. `terrain_texture_3` char(36) NOT NULL,
  315. `terrain_texture_4` char(36) NOT NULL,
  316. `elevation_1_nw` float NOT NULL,
  317. `elevation_2_nw` float NOT NULL,
  318. `elevation_1_ne` float NOT NULL,
  319. `elevation_2_ne` float NOT NULL,
  320. `elevation_1_se` float NOT NULL,
  321. `elevation_2_se` float NOT NULL,
  322. `elevation_1_sw` float NOT NULL,
  323. `elevation_2_sw` float NOT NULL,
  324. `water_height` float NOT NULL,
  325. `terrain_raise_limit` float NOT NULL,
  326. `terrain_lower_limit` float NOT NULL,
  327. `use_estate_sun` int(11) NOT NULL,
  328. `fixed_sun` int(11) NOT NULL,
  329. `sun_position` float NOT NULL,
  330. `covenant` char(36) default NULL,
  331. `Sandbox` tinyint(4) NOT NULL,
  332. PRIMARY KEY (`regionUUID`)
  333. ) ENGINE=InnoDB;
  334. commit;
  335. :VERSION 16 #---------------------
  336. BEGIN;
  337. ALTER TABLE prims ADD COLUMN PayPrice integer not null default 0;
  338. ALTER TABLE prims ADD COLUMN PayButton1 integer not null default 0;
  339. ALTER TABLE prims ADD COLUMN PayButton2 integer not null default 0;
  340. ALTER TABLE prims ADD COLUMN PayButton3 integer not null default 0;
  341. ALTER TABLE prims ADD COLUMN PayButton4 integer not null default 0;
  342. ALTER TABLE prims ADD COLUMN LoopedSound char(36) not null default '00000000-0000-0000-0000-000000000000';
  343. ALTER TABLE prims ADD COLUMN LoopedSoundGain float not null default 0.0;
  344. ALTER TABLE prims ADD COLUMN TextureAnimation blob;
  345. ALTER TABLE prims ADD COLUMN OmegaX float not null default 0.0;
  346. ALTER TABLE prims ADD COLUMN OmegaY float not null default 0.0;
  347. ALTER TABLE prims ADD COLUMN OmegaZ float not null default 0.0;
  348. ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float not null default 0.0;
  349. ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float not null default 0.0;
  350. ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float not null default 0.0;
  351. ALTER TABLE prims ADD COLUMN CameraAtOffsetX float not null default 0.0;
  352. ALTER TABLE prims ADD COLUMN CameraAtOffsetY float not null default 0.0;
  353. ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float not null default 0.0;
  354. ALTER TABLE prims ADD COLUMN ForceMouselook tinyint not null default 0;
  355. ALTER TABLE prims ADD COLUMN ScriptAccessPin integer not null default 0;
  356. ALTER TABLE prims ADD COLUMN AllowedDrop tinyint not null default 0;
  357. ALTER TABLE prims ADD COLUMN DieAtEdge tinyint not null default 0;
  358. ALTER TABLE prims ADD COLUMN SalePrice integer not null default 10;
  359. ALTER TABLE prims ADD COLUMN SaleType tinyint not null default 0;
  360. COMMIT;
  361. :VERSION 17 #---------------------
  362. BEGIN;
  363. ALTER TABLE prims ADD COLUMN ColorR integer not null default 0;
  364. ALTER TABLE prims ADD COLUMN ColorG integer not null default 0;
  365. ALTER TABLE prims ADD COLUMN ColorB integer not null default 0;
  366. ALTER TABLE prims ADD COLUMN ColorA integer not null default 0;
  367. ALTER TABLE prims ADD COLUMN ParticleSystem blob;
  368. COMMIT;
  369. :VERSION 18 #---------------------
  370. begin;
  371. ALTER TABLE prims ADD COLUMN ClickAction tinyint NOT NULL default 0;
  372. commit;
  373. :VERSION 19 #---------------------
  374. begin;
  375. ALTER TABLE prims ADD COLUMN Material tinyint NOT NULL default 3;
  376. commit;
  377. :VERSION 20 #---------------------
  378. begin;
  379. ALTER TABLE land ADD COLUMN OtherCleanTime integer NOT NULL default 0;
  380. ALTER TABLE land ADD COLUMN Dwell integer NOT NULL default 0;
  381. commit;
  382. :VERSION 21 #---------------------
  383. begin;
  384. ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0;
  385. ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0;
  386. ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0;
  387. commit;
  388. :VERSION 22 #---------------------
  389. BEGIN;
  390. ALTER TABLE prims ADD COLUMN CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000';
  391. ALTER TABLE prims ADD COLUMN CollisionSoundVolume float not null default 0.0;
  392. COMMIT;
  393. :VERSION 23 #---------------------
  394. BEGIN;
  395. ALTER TABLE prims ADD COLUMN LinkNumber integer not null default 0;
  396. COMMIT;
  397. :VERSION 24 #---------------------
  398. BEGIN;
  399. alter table regionsettings change column `object_bonus` `object_bonus` double NOT NULL;
  400. alter table regionsettings change column `elevation_1_nw` `elevation_1_nw` double NOT NULL;
  401. alter table regionsettings change column `elevation_2_nw` `elevation_2_nw` double NOT NULL;
  402. alter table regionsettings change column `elevation_1_ne` `elevation_1_ne` double NOT NULL;
  403. alter table regionsettings change column `elevation_2_ne` `elevation_2_ne` double NOT NULL;
  404. alter table regionsettings change column `elevation_1_se` `elevation_1_se` double NOT NULL;
  405. alter table regionsettings change column `elevation_2_se` `elevation_2_se` double NOT NULL;
  406. alter table regionsettings change column `elevation_1_sw` `elevation_1_sw` double NOT NULL;
  407. alter table regionsettings change column `elevation_2_sw` `elevation_2_sw` double NOT NULL;
  408. alter table regionsettings change column `water_height` `water_height` double NOT NULL;
  409. alter table regionsettings change column `terrain_raise_limit` `terrain_raise_limit` double NOT NULL;
  410. alter table regionsettings change column `terrain_lower_limit` `terrain_lower_limit` double NOT NULL;
  411. alter table regionsettings change column `sun_position` `sun_position` double NOT NULL;
  412. COMMIT;
  413. :VERSION 25 #---------------------
  414. BEGIN;
  415. alter table prims change column `PositionX` `PositionX` double default NULL;
  416. alter table prims change column `PositionY` `PositionY` double default NULL;
  417. alter table prims change column `PositionZ` `PositionZ` double default NULL;
  418. alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL;
  419. alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL;
  420. alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL;
  421. alter table prims change column `VelocityX` `VelocityX` double default NULL;
  422. alter table prims change column `VelocityY` `VelocityY` double default NULL;
  423. alter table prims change column `VelocityZ` `VelocityZ` double default NULL;
  424. alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL;
  425. alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL;
  426. alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL;
  427. alter table prims change column `AccelerationX` `AccelerationX` double default NULL;
  428. alter table prims change column `AccelerationY` `AccelerationY` double default NULL;
  429. alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL;
  430. alter table prims change column `RotationX` `RotationX` double default NULL;
  431. alter table prims change column `RotationY` `RotationY` double default NULL;
  432. alter table prims change column `RotationZ` `RotationZ` double default NULL;
  433. alter table prims change column `RotationW` `RotationW` double default NULL;
  434. alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL;
  435. alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL;
  436. alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL;
  437. alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL;
  438. alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL;
  439. alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL;
  440. alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL;
  441. alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0';
  442. alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0';
  443. alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0';
  444. alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0';
  445. alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0';
  446. alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0';
  447. alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0';
  448. alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0';
  449. alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0';
  450. alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0';
  451. alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0';
  452. alter table primshapes change column `ScaleX` `ScaleX` double NOT NULL default '0';
  453. alter table primshapes change column `ScaleY` `ScaleY` double NOT NULL default '0';
  454. alter table primshapes change column `ScaleZ` `ScaleZ` double NOT NULL default '0';
  455. COMMIT;
  456. :VERSION 26 #---------------------
  457. begin;
  458. alter table prims change column `PositionX` `PositionX` double default NULL;
  459. alter table prims change column `PositionY` `PositionY` double default NULL;
  460. alter table prims change column `PositionZ` `PositionZ` double default NULL;
  461. alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL;
  462. alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL;
  463. alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL;
  464. alter table prims change column `VelocityX` `VelocityX` double default NULL;
  465. alter table prims change column `VelocityY` `VelocityY` double default NULL;
  466. alter table prims change column `VelocityZ` `VelocityZ` double default NULL;
  467. alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL;
  468. alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL;
  469. alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL;
  470. alter table prims change column `AccelerationX` `AccelerationX` double default NULL;
  471. alter table prims change column `AccelerationY` `AccelerationY` double default NULL;
  472. alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL;
  473. alter table prims change column `RotationX` `RotationX` double default NULL;
  474. alter table prims change column `RotationY` `RotationY` double default NULL;
  475. alter table prims change column `RotationZ` `RotationZ` double default NULL;
  476. alter table prims change column `RotationW` `RotationW` double default NULL;
  477. alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL;
  478. alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL;
  479. alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL;
  480. alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL;
  481. alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL;
  482. alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL;
  483. alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL;
  484. alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0';
  485. alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0';
  486. alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0';
  487. alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0';
  488. alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0';
  489. alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0';
  490. alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0';
  491. alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0';
  492. alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0';
  493. alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0';
  494. alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0';
  495. commit;
  496. :VERSION 27 #---------------------
  497. BEGIN;
  498. ALTER TABLE prims DROP COLUMN ParentID;
  499. COMMIT;
  500. :VERSION 28 #---------------------
  501. BEGIN;
  502. update terrain
  503. set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12))
  504. where RegionUUID not like '%-%';
  505. update landaccesslist
  506. set LandUUID = concat(substr(LandUUID, 1, 8), "-", substr(LandUUID, 9, 4), "-", substr(LandUUID, 13, 4), "-", substr(LandUUID, 17, 4), "-", substr(LandUUID, 21, 12))
  507. where LandUUID not like '%-%';
  508. update landaccesslist
  509. set AccessUUID = concat(substr(AccessUUID, 1, 8), "-", substr(AccessUUID, 9, 4), "-", substr(AccessUUID, 13, 4), "-", substr(AccessUUID, 17, 4), "-", substr(AccessUUID, 21, 12))
  510. where AccessUUID not like '%-%';
  511. update prims
  512. set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12))
  513. where UUID not like '%-%';
  514. update prims
  515. set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12))
  516. where RegionUUID not like '%-%';
  517. update prims
  518. set SceneGroupID = concat(substr(SceneGroupID, 1, 8), "-", substr(SceneGroupID, 9, 4), "-", substr(SceneGroupID, 13, 4), "-", substr(SceneGroupID, 17, 4), "-", substr(SceneGroupID, 21, 12))
  519. where SceneGroupID not like '%-%';
  520. update prims
  521. set CreatorID = concat(substr(CreatorID, 1, 8), "-", substr(CreatorID, 9, 4), "-", substr(CreatorID, 13, 4), "-", substr(CreatorID, 17, 4), "-", substr(CreatorID, 21, 12))
  522. where CreatorID not like '%-%';
  523. update prims
  524. set OwnerID = concat(substr(OwnerID, 1, 8), "-", substr(OwnerID, 9, 4), "-", substr(OwnerID, 13, 4), "-", substr(OwnerID, 17, 4), "-", substr(OwnerID, 21, 12))
  525. where OwnerID not like '%-%';
  526. update prims
  527. set GroupID = concat(substr(GroupID, 1, 8), "-", substr(GroupID, 9, 4), "-", substr(GroupID, 13, 4), "-", substr(GroupID, 17, 4), "-", substr(GroupID, 21, 12))
  528. where GroupID not like '%-%';
  529. update prims
  530. set LastOwnerID = concat(substr(LastOwnerID, 1, 8), "-", substr(LastOwnerID, 9, 4), "-", substr(LastOwnerID, 13, 4), "-", substr(LastOwnerID, 17, 4), "-", substr(LastOwnerID, 21, 12))
  531. where LastOwnerID not like '%-%';
  532. update primshapes
  533. set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12))
  534. where UUID not like '%-%';
  535. update land
  536. set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12))
  537. where UUID not like '%-%';
  538. update land
  539. set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12))
  540. where RegionUUID not like '%-%';
  541. update land
  542. set OwnerUUID = concat(substr(OwnerUUID, 1, 8), "-", substr(OwnerUUID, 9, 4), "-", substr(OwnerUUID, 13, 4), "-", substr(OwnerUUID, 17, 4), "-", substr(OwnerUUID, 21, 12))
  543. where OwnerUUID not like '%-%';
  544. update land
  545. set GroupUUID = concat(substr(GroupUUID, 1, 8), "-", substr(GroupUUID, 9, 4), "-", substr(GroupUUID, 13, 4), "-", substr(GroupUUID, 17, 4), "-", substr(GroupUUID, 21, 12))
  546. where GroupUUID not like '%-%';
  547. update land
  548. set MediaTextureUUID = concat(substr(MediaTextureUUID, 1, 8), "-", substr(MediaTextureUUID, 9, 4), "-", substr(MediaTextureUUID, 13, 4), "-", substr(MediaTextureUUID, 17, 4), "-", substr(MediaTextureUUID, 21, 12))
  549. where MediaTextureUUID not like '%-%';
  550. update land
  551. set SnapshotUUID = concat(substr(SnapshotUUID, 1, 8), "-", substr(SnapshotUUID, 9, 4), "-", substr(SnapshotUUID, 13, 4), "-", substr(SnapshotUUID, 17, 4), "-", substr(SnapshotUUID, 21, 12))
  552. where SnapshotUUID not like '%-%';
  553. update land
  554. set AuthbuyerID = concat(substr(AuthbuyerID, 1, 8), "-", substr(AuthbuyerID, 9, 4), "-", substr(AuthbuyerID, 13, 4), "-", substr(AuthbuyerID, 17, 4), "-", substr(AuthbuyerID, 21, 12))
  555. where AuthbuyerID not like '%-%';
  556. COMMIT;
  557. :VERSION 29 #---------------------
  558. BEGIN;
  559. ALTER TABLE prims ADD COLUMN PassTouches tinyint not null default 0;
  560. COMMIT;
  561. :VERSION 30 #---------------------
  562. BEGIN;
  563. ALTER TABLE regionsettings ADD COLUMN loaded_creation_date varchar(20) default NULL;
  564. ALTER TABLE regionsettings ADD COLUMN loaded_creation_time varchar(20) default NULL;
  565. ALTER TABLE regionsettings ADD COLUMN loaded_creation_id varchar(64) default NULL;
  566. COMMIT;
  567. :VERSION 31 #---------------------
  568. BEGIN;
  569. ALTER TABLE regionsettings DROP COLUMN loaded_creation_date;
  570. ALTER TABLE regionsettings DROP COLUMN loaded_creation_time;
  571. ALTER TABLE regionsettings ADD COLUMN loaded_creation_datetime int unsigned NOT NULL default 0;
  572. COMMIT;
  573. :VERSION 32
  574. BEGIN;
  575. CREATE TABLE `regionwindlight` (
  576. `region_id` varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000',
  577. `water_color_r` float(9,6) unsigned NOT NULL DEFAULT '4.000000',
  578. `water_color_g` float(9,6) unsigned NOT NULL DEFAULT '38.000000',
  579. `water_color_b` float(9,6) unsigned NOT NULL DEFAULT '64.000000',
  580. `water_fog_density_exponent` float(3,1) unsigned NOT NULL DEFAULT '4.0',
  581. `underwater_fog_modifier` float(3,2) unsigned NOT NULL DEFAULT '0.25',
  582. `reflection_wavelet_scale_1` float(3,1) unsigned NOT NULL DEFAULT '2.0',
  583. `reflection_wavelet_scale_2` float(3,1) unsigned NOT NULL DEFAULT '2.0',
  584. `reflection_wavelet_scale_3` float(3,1) unsigned NOT NULL DEFAULT '2.0',
  585. `fresnel_scale` float(3,2) unsigned NOT NULL DEFAULT '0.40',
  586. `fresnel_offset` float(3,2) unsigned NOT NULL DEFAULT '0.50',
  587. `refract_scale_above` float(3,2) unsigned NOT NULL DEFAULT '0.03',
  588. `refract_scale_below` float(3,2) unsigned NOT NULL DEFAULT '0.20',
  589. `blur_multiplier` float(4,3) unsigned NOT NULL DEFAULT '0.040',
  590. `big_wave_direction_x` float(3,2) NOT NULL DEFAULT '1.05',
  591. `big_wave_direction_y` float(3,2) NOT NULL DEFAULT '-0.42',
  592. `little_wave_direction_x` float(3,2) NOT NULL DEFAULT '1.11',
  593. `little_wave_direction_y` float(3,2) NOT NULL DEFAULT '-1.16',
  594. `normal_map_texture` varchar(36) NOT NULL DEFAULT '822ded49-9a6c-f61c-cb89-6df54f42cdf4',
  595. `horizon_r` float(3,2) unsigned NOT NULL DEFAULT '0.25',
  596. `horizon_g` float(3,2) unsigned NOT NULL DEFAULT '0.25',
  597. `horizon_b` float(3,2) unsigned NOT NULL DEFAULT '0.32',
  598. `horizon_i` float(3,2) unsigned NOT NULL DEFAULT '0.32',
  599. `haze_horizon` float(3,2) unsigned NOT NULL DEFAULT '0.19',
  600. `blue_density_r` float(3,2) unsigned NOT NULL DEFAULT '0.12',
  601. `blue_density_g` float(3,2) unsigned NOT NULL DEFAULT '0.22',
  602. `blue_density_b` float(3,2) unsigned NOT NULL DEFAULT '0.38',
  603. `blue_density_i` float(3,2) unsigned NOT NULL DEFAULT '0.38',
  604. `haze_density` float(3,2) unsigned NOT NULL DEFAULT '0.70',
  605. `density_multiplier` float(3,2) unsigned NOT NULL DEFAULT '0.18',
  606. `distance_multiplier` float(4,1) unsigned NOT NULL DEFAULT '0.8',
  607. `max_altitude` int(4) unsigned NOT NULL DEFAULT '1605',
  608. `sun_moon_color_r` float(3,2) unsigned NOT NULL DEFAULT '0.24',
  609. `sun_moon_color_g` float(3,2) unsigned NOT NULL DEFAULT '0.26',
  610. `sun_moon_color_b` float(3,2) unsigned NOT NULL DEFAULT '0.30',
  611. `sun_moon_color_i` float(3,2) unsigned NOT NULL DEFAULT '0.30',
  612. `sun_moon_position` float(4,3) unsigned NOT NULL DEFAULT '0.317',
  613. `ambient_r` float(3,2) unsigned NOT NULL DEFAULT '0.35',
  614. `ambient_g` float(3,2) unsigned NOT NULL DEFAULT '0.35',
  615. `ambient_b` float(3,2) unsigned NOT NULL DEFAULT '0.35',
  616. `ambient_i` float(3,2) unsigned NOT NULL DEFAULT '0.35',
  617. `east_angle` float(3,2) unsigned NOT NULL DEFAULT '0.00',
  618. `sun_glow_focus` float(3,2) unsigned NOT NULL DEFAULT '0.10',
  619. `sun_glow_size` float(3,2) unsigned NOT NULL DEFAULT '1.75',
  620. `scene_gamma` float(4,2) unsigned NOT NULL DEFAULT '1.00',
  621. `star_brightness` float(3,2) unsigned NOT NULL DEFAULT '0.00',
  622. `cloud_color_r` float(3,2) unsigned NOT NULL DEFAULT '0.41',
  623. `cloud_color_g` float(3,2) unsigned NOT NULL DEFAULT '0.41',
  624. `cloud_color_b` float(3,2) unsigned NOT NULL DEFAULT '0.41',
  625. `cloud_color_i` float(3,2) unsigned NOT NULL DEFAULT '0.41',
  626. `cloud_x` float(3,2) unsigned NOT NULL DEFAULT '1.00',
  627. `cloud_y` float(3,2) unsigned NOT NULL DEFAULT '0.53',
  628. `cloud_density` float(3,2) unsigned NOT NULL DEFAULT '1.00',
  629. `cloud_coverage` float(3,2) unsigned NOT NULL DEFAULT '0.27',
  630. `cloud_scale` float(3,2) unsigned NOT NULL DEFAULT '0.42',
  631. `cloud_detail_x` float(3,2) unsigned NOT NULL DEFAULT '1.00',
  632. `cloud_detail_y` float(3,2) unsigned NOT NULL DEFAULT '0.53',
  633. `cloud_detail_density` float(3,2) unsigned NOT NULL DEFAULT '0.12',
  634. `cloud_scroll_x` float(3,2) unsigned NOT NULL DEFAULT '0.20',
  635. `cloud_scroll_x_lock` tinyint(1) unsigned NOT NULL DEFAULT '0',
  636. `cloud_scroll_y` float(3,2) unsigned NOT NULL DEFAULT '0.01',
  637. `cloud_scroll_y_lock` tinyint(1) unsigned NOT NULL DEFAULT '0',
  638. `draw_classic_clouds` tinyint(1) unsigned NOT NULL DEFAULT '1',
  639. PRIMARY KEY (`region_id`)
  640. );
  641. :VERSION 33 #---------------------
  642. BEGIN;
  643. ALTER TABLE regionsettings ADD map_tile_ID CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
  644. COMMIT;
  645. :VERSION 34 #---------------------
  646. BEGIN;
  647. ALTER TABLE `regionwindlight` CHANGE COLUMN `cloud_scroll_x` `cloud_scroll_x` FLOAT(4,2) NOT NULL DEFAULT '0.20' AFTER `cloud_detail_density`, CHANGE COLUMN `cloud_scroll_y` `cloud_scroll_y` FLOAT(4,2) NOT NULL DEFAULT '0.01' AFTER `cloud_scroll_x_lock`;
  648. COMMIT;