RegionStore.migrations 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  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;