1
0

RegionStore.migrations 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. :VERSION 1
  2. BEGIN TRANSACTION;
  3. CREATE TABLE prims(
  4. UUID varchar(255) primary key,
  5. RegionUUID varchar(255),
  6. ParentID integer,
  7. CreationDate integer,
  8. Name varchar(255),
  9. SceneGroupID varchar(255),
  10. Text varchar(255),
  11. Description varchar(255),
  12. SitName varchar(255),
  13. TouchName varchar(255),
  14. CreatorID varchar(255),
  15. OwnerID varchar(255),
  16. GroupID varchar(255),
  17. LastOwnerID varchar(255),
  18. OwnerMask integer,
  19. NextOwnerMask integer,
  20. GroupMask integer,
  21. EveryoneMask integer,
  22. BaseMask integer,
  23. PositionX float,
  24. PositionY float,
  25. PositionZ float,
  26. GroupPositionX float,
  27. GroupPositionY float,
  28. GroupPositionZ float,
  29. VelocityX float,
  30. VelocityY float,
  31. VelocityZ float,
  32. AngularVelocityX float,
  33. AngularVelocityY float,
  34. AngularVelocityZ float,
  35. AccelerationX float,
  36. AccelerationY float,
  37. AccelerationZ float,
  38. RotationX float,
  39. RotationY float,
  40. RotationZ float,
  41. RotationW float,
  42. ObjectFlags integer,
  43. SitTargetOffsetX float NOT NULL default 0,
  44. SitTargetOffsetY float NOT NULL default 0,
  45. SitTargetOffsetZ float NOT NULL default 0,
  46. SitTargetOrientW float NOT NULL default 0,
  47. SitTargetOrientX float NOT NULL default 0,
  48. SitTargetOrientY float NOT NULL default 0,
  49. SitTargetOrientZ float NOT NULL default 0);
  50. CREATE TABLE primshapes(
  51. UUID varchar(255) primary key,
  52. Shape integer,
  53. ScaleX float,
  54. ScaleY float,
  55. ScaleZ float,
  56. PCode integer,
  57. PathBegin integer,
  58. PathEnd integer,
  59. PathScaleX integer,
  60. PathScaleY integer,
  61. PathShearX integer,
  62. PathShearY integer,
  63. PathSkew integer,
  64. PathCurve integer,
  65. PathRadiusOffset integer,
  66. PathRevolutions integer,
  67. PathTaperX integer,
  68. PathTaperY integer,
  69. PathTwist integer,
  70. PathTwistBegin integer,
  71. ProfileBegin integer,
  72. ProfileEnd integer,
  73. ProfileCurve integer,
  74. ProfileHollow integer,
  75. Texture blob,
  76. ExtraParams blob,
  77. State Integer NOT NULL default 0);
  78. CREATE TABLE primitems(
  79. itemID varchar(255) primary key,
  80. primID varchar(255),
  81. assetID varchar(255),
  82. parentFolderID varchar(255),
  83. invType integer,
  84. assetType integer,
  85. name varchar(255),
  86. description varchar(255),
  87. creationDate integer,
  88. creatorID varchar(255),
  89. ownerID varchar(255),
  90. lastOwnerID varchar(255),
  91. groupID varchar(255),
  92. nextPermissions string,
  93. currentPermissions string,
  94. basePermissions string,
  95. everyonePermissions string,
  96. groupPermissions string);
  97. CREATE TABLE terrain(
  98. RegionUUID varchar(255),
  99. Revision integer,
  100. Heightfield blob);
  101. CREATE TABLE land(
  102. UUID varchar(255) primary key,
  103. RegionUUID varchar(255),
  104. LocalLandID string,
  105. Bitmap blob,
  106. Name varchar(255),
  107. Desc varchar(255),
  108. OwnerUUID varchar(255),
  109. IsGroupOwned string,
  110. Area integer,
  111. AuctionID integer,
  112. Category integer,
  113. ClaimDate integer,
  114. ClaimPrice integer,
  115. GroupUUID varchar(255),
  116. SalePrice integer,
  117. LandStatus integer,
  118. LandFlags string,
  119. LandingType string,
  120. MediaAutoScale string,
  121. MediaTextureUUID varchar(255),
  122. MediaURL varchar(255),
  123. MusicURL varchar(255),
  124. PassHours float,
  125. PassPrice string,
  126. SnapshotUUID varchar(255),
  127. UserLocationX float,
  128. UserLocationY float,
  129. UserLocationZ float,
  130. UserLookAtX float,
  131. UserLookAtY float,
  132. UserLookAtZ float,
  133. AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000');
  134. CREATE TABLE landaccesslist(
  135. LandUUID varchar(255),
  136. AccessUUID varchar(255),
  137. Flags string);
  138. COMMIT;
  139. :VERSION 2
  140. BEGIN TRANSACTION;
  141. CREATE TABLE regionban(
  142. regionUUID varchar (255),
  143. bannedUUID varchar (255),
  144. bannedIp varchar (255),
  145. bannedIpHostMask varchar (255)
  146. );
  147. COMMIT;
  148. :VERSION 3
  149. BEGIN;
  150. ALTER TABLE primitems add flags integer not null default 0;
  151. COMMIT;
  152. :VERSION 4
  153. BEGIN;
  154. create table regionsettings (
  155. regionUUID char(36) not null,
  156. block_terraform integer not null,
  157. block_fly integer not null,
  158. allow_damage integer not null,
  159. restrict_pushing integer not null,
  160. allow_land_resell integer not null,
  161. allow_land_join_divide integer not null,
  162. block_show_in_search integer not null,
  163. agent_limit integer not null,
  164. object_bonus float not null,
  165. maturity integer not null,
  166. disable_scripts integer not null,
  167. disable_collisions integer not null,
  168. disable_physics integer not null,
  169. terrain_texture_1 char(36) not null,
  170. terrain_texture_2 char(36) not null,
  171. terrain_texture_3 char(36) not null,
  172. terrain_texture_4 char(36) not null,
  173. elevation_1_nw float not null,
  174. elevation_2_nw float not null,
  175. elevation_1_ne float not null,
  176. elevation_2_ne float not null,
  177. elevation_1_se float not null,
  178. elevation_2_se float not null,
  179. elevation_1_sw float not null,
  180. elevation_2_sw float not null,
  181. water_height float not null,
  182. terrain_raise_limit float not null,
  183. terrain_lower_limit float not null,
  184. use_estate_sun integer not null,
  185. fixed_sun integer not null,
  186. sun_position float not null,
  187. covenant char(36));
  188. COMMIT;
  189. :VERSION 5
  190. BEGIN;
  191. delete from regionsettings;
  192. COMMIT;
  193. :VERSION 6
  194. BEGIN TRANSACTION;
  195. drop table regionsettings;
  196. CREATE TABLE regionsettings (
  197. regionUUID char(36) NOT NULL,
  198. block_terraform int(11) NOT NULL,
  199. block_fly int(11) NOT NULL,
  200. allow_damage int(11) NOT NULL,
  201. restrict_pushing int(11) NOT NULL,
  202. allow_land_resell int(11) NOT NULL,
  203. allow_land_join_divide int(11) NOT NULL,
  204. block_show_in_search int(11) NOT NULL,
  205. agent_limit int(11) NOT NULL,
  206. object_bonus float NOT NULL,
  207. maturity int(11) NOT NULL,
  208. disable_scripts int(11) NOT NULL,
  209. disable_collisions int(11) NOT NULL,
  210. disable_physics int(11) NOT NULL,
  211. terrain_texture_1 char(36) NOT NULL,
  212. terrain_texture_2 char(36) NOT NULL,
  213. terrain_texture_3 char(36) NOT NULL,
  214. terrain_texture_4 char(36) NOT NULL,
  215. elevation_1_nw float NOT NULL,
  216. elevation_2_nw float NOT NULL,
  217. elevation_1_ne float NOT NULL,
  218. elevation_2_ne float NOT NULL,
  219. elevation_1_se float NOT NULL,
  220. elevation_2_se float NOT NULL,
  221. elevation_1_sw float NOT NULL,
  222. elevation_2_sw float NOT NULL,
  223. water_height float NOT NULL,
  224. terrain_raise_limit float NOT NULL,
  225. terrain_lower_limit float NOT NULL,
  226. use_estate_sun int(11) NOT NULL,
  227. fixed_sun int(11) NOT NULL,
  228. sun_position float NOT NULL,
  229. covenant char(36) default NULL,
  230. sandbox tinyint(4) NOT NULL,
  231. PRIMARY KEY (regionUUID)
  232. );
  233. COMMIT;
  234. :VERSION 9
  235. BEGIN;
  236. ALTER TABLE prims ADD COLUMN ColorR integer not null default 0;
  237. ALTER TABLE prims ADD COLUMN ColorG integer not null default 0;
  238. ALTER TABLE prims ADD COLUMN ColorB integer not null default 0;
  239. ALTER TABLE prims ADD COLUMN ColorA integer not null default 0;
  240. COMMIT;
  241. :VERSION 10
  242. BEGIN;
  243. ALTER TABLE prims ADD COLUMN ClickAction INTEGER NOT NULL default 0;
  244. COMMIT;
  245. :VERSION 11
  246. BEGIN;
  247. ALTER TABLE prims ADD COLUMN PayPrice INTEGER NOT NULL default 0;
  248. ALTER TABLE prims ADD COLUMN PayButton1 INTEGER NOT NULL default 0;
  249. ALTER TABLE prims ADD COLUMN PayButton2 INTEGER NOT NULL default 0;
  250. ALTER TABLE prims ADD COLUMN PayButton3 INTEGER NOT NULL default 0;
  251. ALTER TABLE prims ADD COLUMN PayButton4 INTEGER NOT NULL default 0;
  252. ALTER TABLE prims ADD COLUMN LoopedSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
  253. ALTER TABLE prims ADD COLUMN LoopedSoundGain float NOT NULL default 0;
  254. ALTER TABLE prims ADD COLUMN TextureAnimation string;
  255. ALTER TABLE prims ADD COLUMN ParticleSystem string;
  256. ALTER TABLE prims ADD COLUMN OmegaX float NOT NULL default 0;
  257. ALTER TABLE prims ADD COLUMN OmegaY float NOT NULL default 0;
  258. ALTER TABLE prims ADD COLUMN OmegaZ float NOT NULL default 0;
  259. ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float NOT NULL default 0;
  260. ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float NOT NULL default 0;
  261. ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float NOT NULL default 0;
  262. ALTER TABLE prims ADD COLUMN CameraAtOffsetX float NOT NULL default 0;
  263. ALTER TABLE prims ADD COLUMN CameraAtOffsetY float NOT NULL default 0;
  264. ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float NOT NULL default 0;
  265. ALTER TABLE prims ADD COLUMN ForceMouselook string NOT NULL default 0;
  266. ALTER TABLE prims ADD COLUMN ScriptAccessPin INTEGER NOT NULL default 0;
  267. ALTER TABLE prims ADD COLUMN AllowedDrop INTEGER NOT NULL default 0;
  268. ALTER TABLE prims ADD COLUMN DieAtEdge string NOT NULL default 0;
  269. ALTER TABLE prims ADD COLUMN SalePrice INTEGER NOT NULL default 0;
  270. ALTER TABLE prims ADD COLUMN SaleType string NOT NULL default 0;
  271. COMMIT;
  272. :VERSION 12
  273. BEGIN;
  274. ALTER TABLE prims ADD COLUMN Material INTEGER NOT NULL default 3;
  275. COMMIT;
  276. :VERSION 13
  277. BEGIN;
  278. ALTER TABLE land ADD COLUMN OtherCleanTime INTEGER NOT NULL default 0;
  279. ALTER TABLE land ADD COLUMN Dwell INTEGER NOT NULL default 0;
  280. COMMIT;
  281. :VERSION 14
  282. begin;
  283. ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0;
  284. ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0;
  285. ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0;
  286. commit;
  287. :VERSION 15
  288. BEGIN;
  289. ALTER TABLE prims ADD COLUMN CollisionSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
  290. ALTER TABLE prims ADD COLUMN CollisionSoundVolume float NOT NULL default 0;
  291. COMMIT;
  292. :VERSION 16
  293. BEGIN;
  294. ALTER TABLE prims ADD COLUMN VolumeDetect INTEGER NOT NULL DEFAULT 0;
  295. COMMIT;
  296. :VERSION 17
  297. BEGIN;
  298. CREATE TEMPORARY TABLE prims_backup(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect);
  299. INSERT INTO prims_backup SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims;
  300. DROP TABLE prims;
  301. CREATE TABLE prims(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect);
  302. INSERT INTO prims SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims_backup;
  303. DROP TABLE prims_backup;
  304. COMMIT;
  305. :VERSION 18
  306. BEGIN;
  307. update terrain
  308. set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
  309. where RegionUUID not like '%-%';
  310. update landaccesslist
  311. set LandUUID = substr(LandUUID, 1, 8) || "-" || substr(LandUUID, 9, 4) || "-" || substr(LandUUID, 13, 4) || "-" || substr(LandUUID, 17, 4) || "-" || substr(LandUUID, 21, 12)
  312. where LandUUID not like '%-%';
  313. update landaccesslist
  314. set AccessUUID = substr(AccessUUID, 1, 8) || "-" || substr(AccessUUID, 9, 4) || "-" || substr(AccessUUID, 13, 4) || "-" || substr(AccessUUID, 17, 4) || "-" || substr(AccessUUID, 21, 12)
  315. where AccessUUID not like '%-%';
  316. update prims
  317. set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
  318. where UUID not like '%-%';
  319. update prims
  320. set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
  321. where RegionUUID not like '%-%';
  322. update prims
  323. set SceneGroupID = substr(SceneGroupID, 1, 8) || "-" || substr(SceneGroupID, 9, 4) || "-" || substr(SceneGroupID, 13, 4) || "-" || substr(SceneGroupID, 17, 4) || "-" || substr(SceneGroupID, 21, 12)
  324. where SceneGroupID not like '%-%';
  325. update prims
  326. set CreatorID = substr(CreatorID, 1, 8) || "-" || substr(CreatorID, 9, 4) || "-" || substr(CreatorID, 13, 4) || "-" || substr(CreatorID, 17, 4) || "-" || substr(CreatorID, 21, 12)
  327. where CreatorID not like '%-%';
  328. update prims
  329. set OwnerID = substr(OwnerID, 1, 8) || "-" || substr(OwnerID, 9, 4) || "-" || substr(OwnerID, 13, 4) || "-" || substr(OwnerID, 17, 4) || "-" || substr(OwnerID, 21, 12)
  330. where OwnerID not like '%-%';
  331. update prims
  332. set GroupID = substr(GroupID, 1, 8) || "-" || substr(GroupID, 9, 4) || "-" || substr(GroupID, 13, 4) || "-" || substr(GroupID, 17, 4) || "-" || substr(GroupID, 21, 12)
  333. where GroupID not like '%-%';
  334. update prims
  335. set LastOwnerID = substr(LastOwnerID, 1, 8) || "-" || substr(LastOwnerID, 9, 4) || "-" || substr(LastOwnerID, 13, 4) || "-" || substr(LastOwnerID, 17, 4) || "-" || substr(LastOwnerID, 21, 12)
  336. where LastOwnerID not like '%-%';
  337. update primshapes
  338. set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
  339. where UUID not like '%-%';
  340. update land
  341. set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
  342. where UUID not like '%-%';
  343. update land
  344. set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
  345. where RegionUUID not like '%-%';
  346. update land
  347. set OwnerUUID = substr(OwnerUUID, 1, 8) || "-" || substr(OwnerUUID, 9, 4) || "-" || substr(OwnerUUID, 13, 4) || "-" || substr(OwnerUUID, 17, 4) || "-" || substr(OwnerUUID, 21, 12)
  348. where OwnerUUID not like '%-%';
  349. update land
  350. set GroupUUID = substr(GroupUUID, 1, 8) || "-" || substr(GroupUUID, 9, 4) || "-" || substr(GroupUUID, 13, 4) || "-" || substr(GroupUUID, 17, 4) || "-" || substr(GroupUUID, 21, 12)
  351. where GroupUUID not like '%-%';
  352. update land
  353. set MediaTextureUUID = substr(MediaTextureUUID, 1, 8) || "-" || substr(MediaTextureUUID, 9, 4) || "-" || substr(MediaTextureUUID, 13, 4) || "-" || substr(MediaTextureUUID, 17, 4) || "-" || substr(MediaTextureUUID, 21, 12)
  354. where MediaTextureUUID not like '%-%';
  355. update land
  356. set SnapshotUUID = substr(SnapshotUUID, 1, 8) || "-" || substr(SnapshotUUID, 9, 4) || "-" || substr(SnapshotUUID, 13, 4) || "-" || substr(SnapshotUUID, 17, 4) || "-" || substr(SnapshotUUID, 21, 12)
  357. where SnapshotUUID not like '%-%';
  358. update land
  359. set AuthbuyerID = substr(AuthbuyerID, 1, 8) || "-" || substr(AuthbuyerID, 9, 4) || "-" || substr(AuthbuyerID, 13, 4) || "-" || substr(AuthbuyerID, 17, 4) || "-" || substr(AuthbuyerID, 21, 12)
  360. where AuthbuyerID not like '%-%';
  361. COMMIT;
  362. :VERSION 19
  363. BEGIN;
  364. ALTER TABLE regionsettings ADD COLUMN map_tile_ID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
  365. COMMIT;
  366. :VERSION 20
  367. BEGIN;
  368. ALTER TABLE prims ADD COLUMN MediaURL varchar(255);
  369. ALTER TABLE primshapes ADD COLUMN Media TEXT;
  370. COMMIT;
  371. :VERSION 21
  372. BEGIN;
  373. ALTER TABLE `land` ADD COLUMN `MediaType` VARCHAR(32) NOT NULL DEFAULT 'none/none';
  374. ALTER TABLE `land` ADD COLUMN `MediaDescription` VARCHAR(255) NOT NULL DEFAULT '';
  375. ALTER TABLE `land` ADD COLUMN `MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0';
  376. ALTER TABLE `land` ADD COLUMN `MediaLoop` BOOLEAN NOT NULL DEFAULT FALSE;
  377. ALTER TABLE `land` ADD COLUMN `ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE;
  378. ALTER TABLE `land` ADD COLUMN `ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE;
  379. COMMIT;
  380. :VERSION 22
  381. BEGIN;
  382. ALTER TABLE regionsettings ADD COLUMN covenant_datetime INTEGER NOT NULL default 0;
  383. COMMIT;
  384. :VERSION 23
  385. BEGIN;
  386. CREATE TABLE regionwindlight (
  387. region_id VARCHAR(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000' PRIMARY KEY,
  388. water_color_r FLOAT NOT NULL DEFAULT '4.000000',
  389. water_color_g FLOAT NOT NULL DEFAULT '38.000000',
  390. water_color_b FLOAT NOT NULL DEFAULT '64.000000',
  391. water_color_i FLOAT NOT NULL DEFAULT '1.000000',
  392. water_fog_density_exponent FLOAT NOT NULL DEFAULT '4.0',
  393. underwater_fog_modifier FLOAT NOT NULL DEFAULT '0.25',
  394. reflection_wavelet_scale_1 FLOAT NOT NULL DEFAULT '2.0',
  395. reflection_wavelet_scale_2 FLOAT NOT NULL DEFAULT '2.0',
  396. reflection_wavelet_scale_3 FLOAT NOT NULL DEFAULT '2.0',
  397. fresnel_scale FLOAT NOT NULL DEFAULT '0.40',
  398. fresnel_offset FLOAT NOT NULL DEFAULT '0.50',
  399. refract_scale_above FLOAT NOT NULL DEFAULT '0.03',
  400. refract_scale_below FLOAT NOT NULL DEFAULT '0.20',
  401. blur_multiplier FLOAT NOT NULL DEFAULT '0.040',
  402. big_wave_direction_x FLOAT NOT NULL DEFAULT '1.05',
  403. big_wave_direction_y FLOAT NOT NULL DEFAULT '-0.42',
  404. little_wave_direction_x FLOAT NOT NULL DEFAULT '1.11',
  405. little_wave_direction_y FLOAT NOT NULL DEFAULT '-1.16',
  406. normal_map_texture VARCHAR(36) NOT NULL DEFAULT '822ded49-9a6c-f61c-cb89-6df54f42cdf4',
  407. horizon_r FLOAT NOT NULL DEFAULT '0.25',
  408. horizon_g FLOAT NOT NULL DEFAULT '0.25',
  409. horizon_b FLOAT NOT NULL DEFAULT '0.32',
  410. horizon_i FLOAT NOT NULL DEFAULT '0.32',
  411. haze_horizon FLOAT NOT NULL DEFAULT '0.19',
  412. blue_density_r FLOAT NOT NULL DEFAULT '0.12',
  413. blue_density_g FLOAT NOT NULL DEFAULT '0.22',
  414. blue_density_b FLOAT NOT NULL DEFAULT '0.38',
  415. blue_density_i FLOAT NOT NULL DEFAULT '0.38',
  416. haze_density FLOAT NOT NULL DEFAULT '0.70',
  417. density_multiplier FLOAT NOT NULL DEFAULT '0.18',
  418. distance_multiplier FLOAT NOT NULL DEFAULT '0.8',
  419. max_altitude INTEGER NOT NULL DEFAULT '1605',
  420. sun_moon_color_r FLOAT NOT NULL DEFAULT '0.24',
  421. sun_moon_color_g FLOAT NOT NULL DEFAULT '0.26',
  422. sun_moon_color_b FLOAT NOT NULL DEFAULT '0.30',
  423. sun_moon_color_i FLOAT NOT NULL DEFAULT '0.30',
  424. sun_moon_position FLOAT NOT NULL DEFAULT '0.317',
  425. ambient_r FLOAT NOT NULL DEFAULT '0.35',
  426. ambient_g FLOAT NOT NULL DEFAULT '0.35',
  427. ambient_b FLOAT NOT NULL DEFAULT '0.35',
  428. ambient_i FLOAT NOT NULL DEFAULT '0.35',
  429. east_angle FLOAT NOT NULL DEFAULT '0.00',
  430. sun_glow_focus FLOAT NOT NULL DEFAULT '0.10',
  431. sun_glow_size FLOAT NOT NULL DEFAULT '1.75',
  432. scene_gamma FLOAT NOT NULL DEFAULT '1.00',
  433. star_brightness FLOAT NOT NULL DEFAULT '0.00',
  434. cloud_color_r FLOAT NOT NULL DEFAULT '0.41',
  435. cloud_color_g FLOAT NOT NULL DEFAULT '0.41',
  436. cloud_color_b FLOAT NOT NULL DEFAULT '0.41',
  437. cloud_color_i FLOAT NOT NULL DEFAULT '0.41',
  438. cloud_x FLOAT NOT NULL DEFAULT '1.00',
  439. cloud_y FLOAT NOT NULL DEFAULT '0.53',
  440. cloud_density FLOAT NOT NULL DEFAULT '1.00',
  441. cloud_coverage FLOAT NOT NULL DEFAULT '0.27',
  442. cloud_scale FLOAT NOT NULL DEFAULT '0.42',
  443. cloud_detail_x FLOAT NOT NULL DEFAULT '1.00',
  444. cloud_detail_y FLOAT NOT NULL DEFAULT '0.53',
  445. cloud_detail_density FLOAT NOT NULL DEFAULT '0.12',
  446. cloud_scroll_x FLOAT NOT NULL DEFAULT '0.20',
  447. cloud_scroll_x_lock INTEGER NOT NULL DEFAULT '0',
  448. cloud_scroll_y FLOAT NOT NULL DEFAULT '0.01',
  449. cloud_scroll_y_lock INTEGER NOT NULL DEFAULT '0',
  450. draw_classic_clouds INTEGER NOT NULL DEFAULT '1');
  451. COMMIT;
  452. :VERSION 24
  453. BEGIN;
  454. CREATE TABLE IF NOT EXISTS `spawn_points` (
  455. `RegionID` varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000',
  456. `Yaw` float NOT NULL,
  457. `Pitch` float NOT NULL,
  458. `Distance` float NOT NULL
  459. );
  460. ALTER TABLE `regionsettings` ADD COLUMN `TelehubObject` varchar(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
  461. COMMIT;
  462. :VERSION 25
  463. BEGIN;
  464. ALTER TABLE `regionsettings` ADD COLUMN `parcel_tile_ID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
  465. COMMIT;
  466. :VERSION 26
  467. BEGIN;
  468. CREATE TABLE `regionenvironment` (
  469. `region_id` varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000' PRIMARY KEY,
  470. `llsd_settings` TEXT NOT NULL
  471. );
  472. COMMIT;
  473. :VERSION 27
  474. BEGIN;
  475. ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
  476. COMMIT;
  477. :VERSION 28
  478. BEGIN;
  479. ALTER TABLE prims ADD COLUMN `PhysicsShapeType` tinyint(4) NOT NULL default '0';
  480. ALTER TABLE prims ADD COLUMN `Density` double NOT NULL default '1000';
  481. ALTER TABLE prims ADD COLUMN `GravityModifier` double NOT NULL default '1';
  482. ALTER TABLE prims ADD COLUMN `Friction` double NOT NULL default '0.6';
  483. ALTER TABLE prims ADD COLUMN `Restitution` double NOT NULL default '0.5';
  484. COMMIT;
  485. :VERSION 29 #---------------- Keyframes
  486. BEGIN;
  487. ALTER TABLE prims ADD COLUMN `KeyframeMotion` blob;
  488. COMMIT;
  489. :VERSION 30 #---------------- Save Attachment info
  490. BEGIN;
  491. ALTER TABLE prims ADD COLUMN AttachedPosX double default '0';
  492. ALTER TABLE prims ADD COLUMN AttachedPosY double default '0';
  493. ALTER TABLE prims ADD COLUMN AttachedPosZ double default '0';
  494. ALTER TABLE primshapes ADD COLUMN LastAttachPoint int not null default '0';
  495. COMMIT;