RegionStore.migrations 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162
  1. begin transaction ;
  2. :VERSION 1
  3. CREATE TABLE prims(
  4. "UUID" varchar(255) NOT NULL Primary key,
  5. "RegionUUID" varchar(255) NULL,
  6. "ParentID" int NULL,
  7. "CreationDate" int NULL,
  8. "Name" varchar(255) NULL,
  9. "SceneGroupID" varchar(255) NULL,
  10. "Text" varchar(255) NULL,
  11. "Description" varchar(255) NULL,
  12. "SitName" varchar(255) NULL,
  13. "TouchName" varchar(255) NULL,
  14. "ObjectFlags" int NULL,
  15. "CreatorID" varchar(255) NULL,
  16. "OwnerID" varchar(255) NULL,
  17. "GroupID" varchar(255) NULL,
  18. "LastOwnerID" varchar(255) NULL,
  19. "OwnerMask" int NULL,
  20. "NextOwnerMask" int NULL,
  21. "GroupMask" int NULL,
  22. "EveryoneMask" int NULL,
  23. "BaseMask" int NULL,
  24. "PositionX" double precision NULL,
  25. "PositionY" double precision NULL,
  26. "PositionZ" double precision NULL,
  27. "GroupPositionX" double precision NULL,
  28. "GroupPositionY" double precision NULL,
  29. "GroupPositionZ" double precision NULL,
  30. "VelocityX" double precision NULL,
  31. "VelocityY" double precision NULL,
  32. "VelocityZ" double precision NULL,
  33. "AngularVelocityX" double precision NULL,
  34. "AngularVelocityY" double precision NULL,
  35. "AngularVelocityZ" double precision NULL,
  36. "AccelerationX" double precision NULL,
  37. "AccelerationY" double precision NULL,
  38. "AccelerationZ" double precision NULL,
  39. "RotationX" double precision NULL,
  40. "RotationY" double precision NULL,
  41. "RotationZ" double precision NULL,
  42. "RotationW" double precision NULL,
  43. "SitTargetOffsetX" double precision NULL,
  44. "SitTargetOffsetY" double precision NULL,
  45. "SitTargetOffsetZ" double precision NULL,
  46. "SitTargetOrientW" double precision NULL,
  47. "SitTargetOrientX" double precision NULL,
  48. "SitTargetOrientY" double precision NULL,
  49. "SitTargetOrientZ" double precision NULL
  50. );
  51. CREATE TABLE primshapes(
  52. "UUID" varchar(255) NOT NULL primary key,
  53. "Shape" int NULL,
  54. "ScaleX" double precision NULL,
  55. "ScaleY" double precision NULL,
  56. "ScaleZ" double precision NULL,
  57. "PCode" int NULL,
  58. "PathBegin" int NULL,
  59. "PathEnd" int NULL,
  60. "PathScaleX" int NULL,
  61. "PathScaleY" int NULL,
  62. "PathShearX" int NULL,
  63. "PathShearY" int NULL,
  64. "PathSkew" int NULL,
  65. "PathCurve" int NULL,
  66. "PathRadiusOffset" int NULL,
  67. "PathRevolutions" int NULL,
  68. "PathTaperX" int NULL,
  69. "PathTaperY" int NULL,
  70. "PathTwist" int NULL,
  71. "PathTwistBegin" int NULL,
  72. "ProfileBegin" int NULL,
  73. "ProfileEnd" int NULL,
  74. "ProfileCurve" int NULL,
  75. "ProfileHollow" int NULL,
  76. "State" int NULL,
  77. "Texture" bytea NULL,
  78. "ExtraParams" bytea NULL
  79. );
  80. CREATE TABLE primitems(
  81. "itemID" varchar(255) NOT NULL primary key,
  82. "primID" varchar(255) NULL,
  83. "assetID" varchar(255) NULL,
  84. "parentFolderID" varchar(255) NULL,
  85. "invType" int NULL,
  86. "assetType" int NULL,
  87. "name" varchar(255) NULL,
  88. "description" varchar(255) NULL,
  89. "creationDate" varchar(255) NULL,
  90. "creatorID" varchar(255) NULL,
  91. "ownerID" varchar(255) NULL,
  92. "lastOwnerID" varchar(255) NULL,
  93. "groupID" varchar(255) NULL,
  94. "nextPermissions" int NULL,
  95. "currentPermissions" int NULL,
  96. "basePermissions" int NULL,
  97. "everyonePermissions" int NULL,
  98. "groupPermissions" int NULL
  99. );
  100. CREATE TABLE terrain(
  101. "RegionUUID" varchar(255) NULL,
  102. "Revision" int NULL,
  103. "Heightfield" bytea NULL
  104. );
  105. CREATE TABLE land(
  106. "UUID" varchar(255) NOT NULL primary key,
  107. "RegionUUID" varchar(255) NULL,
  108. "LocalLandID" int NULL,
  109. "Bitmap" bytea NULL,
  110. "Name" varchar(255) NULL,
  111. "Description" varchar(255) NULL,
  112. "OwnerUUID" varchar(255) NULL,
  113. "IsGroupOwned" boolean NULL,
  114. "Area" int NULL,
  115. "AuctionID" int NULL,
  116. "Category" int NULL,
  117. "ClaimDate" int NULL,
  118. "ClaimPrice" int NULL,
  119. "GroupUUID" varchar(255) NULL,
  120. "SalePrice" int NULL,
  121. "LandStatus" int NULL,
  122. "LandFlags" int NULL,
  123. "LandingType" int NULL,
  124. "MediaAutoScale" int NULL,
  125. "MediaTextureUUID" varchar(255) NULL,
  126. "MediaURL" varchar(255) NULL,
  127. "MusicURL" varchar(255) NULL,
  128. "PassHours" double precision NULL,
  129. "PassPrice" int NULL,
  130. "SnapshotUUID" varchar(255) NULL,
  131. "UserLocationX" double precision NULL,
  132. "UserLocationY" double precision NULL,
  133. "UserLocationZ" double precision NULL,
  134. "UserLookAtX" double precision NULL,
  135. "UserLookAtY" double precision NULL,
  136. "UserLookAtZ" double precision NULL
  137. );
  138. Create index on land (lower("Name"));
  139. CREATE TABLE landaccesslist(
  140. "LandUUID" varchar(255) NULL,
  141. "AccessUUID" varchar(255) NULL,
  142. "Flags" int NULL
  143. );
  144. COMMIT;
  145. :VERSION 2
  146. BEGIN TRANSACTION;
  147. CREATE TABLE regionban (
  148. "regionUUID" VARCHAR(36) NOT NULL,
  149. "bannedUUID" VARCHAR(36) NOT NULL,
  150. "bannedIp" VARCHAR(16) NOT NULL,
  151. "bannedIpHostMask" VARCHAR(16) NOT NULL
  152. );
  153. create table regionsettings (
  154. "regionUUID" varchar(36) not null primary key,
  155. "block_terraform" boolean not null,
  156. "block_fly" boolean not null,
  157. "allow_damage" boolean not null,
  158. "restrict_pushing" boolean not null,
  159. "allow_land_resell" boolean not null,
  160. "allow_land_join_divide" boolean not null,
  161. "block_show_in_search" boolean not null,
  162. "agent_limit" int not null,
  163. "object_bonus" double precision not null,
  164. "maturity" int not null,
  165. "disable_scripts" boolean not null,
  166. "disable_collisions" boolean not null,
  167. "disable_physics" boolean not null,
  168. "terrain_texture_1" varchar(36) not null,
  169. "terrain_texture_2" varchar(36) not null,
  170. "terrain_texture_3" varchar(36) not null,
  171. "terrain_texture_4" varchar(36) not null,
  172. "elevation_1_nw" double precision not null,
  173. "elevation_2_nw" double precision not null,
  174. "elevation_1_ne" double precision not null,
  175. "elevation_2_ne" double precision not null,
  176. "elevation_1_se" double precision not null,
  177. "elevation_2_se" double precision not null,
  178. "elevation_1_sw" double precision not null,
  179. "elevation_2_sw" double precision not null,
  180. "water_height" double precision not null,
  181. "terrain_raise_limit" double precision not null,
  182. "terrain_lower_limit" double precision not null,
  183. "use_estate_sun" boolean not null,
  184. "fixed_sun" boolean not null,
  185. "sun_position" double precision not null,
  186. "covenant" varchar(36) default NULL,
  187. "Sandbox" boolean NOT NULL
  188. );
  189. COMMIT;
  190. :VERSION 3
  191. BEGIN TRANSACTION;
  192. CREATE TABLE Tmp_prims
  193. (
  194. "UUID" varchar(36) NOT NULL ,
  195. "RegionUUID" varchar(36) NULL,
  196. "ParentID" int NULL,
  197. "CreationDate" int NULL,
  198. "Name" varchar(255) NULL,
  199. "SceneGroupID" varchar(36) NULL,
  200. "Text" varchar(255) NULL,
  201. "Description" varchar(255) NULL,
  202. "SitName" varchar(255) NULL,
  203. "TouchName" varchar(255) NULL,
  204. "ObjectFlags" int NULL,
  205. "CreatorID" varchar(36) NULL,
  206. "OwnerID" varchar(36) NULL,
  207. "GroupID" varchar(36) NULL,
  208. "LastOwnerID" varchar(36) NULL,
  209. "OwnerMask" int NULL,
  210. "NextOwnerMask" int NULL,
  211. "GroupMask" int NULL,
  212. "EveryoneMask" int NULL,
  213. "BaseMask" int NULL,
  214. "PositionX" double precision NULL,
  215. "PositionY" double precision NULL,
  216. "PositionZ" double precision NULL,
  217. "GroupPositionX" double precision NULL,
  218. "GroupPositionY" double precision NULL,
  219. "GroupPositionZ" double precision NULL,
  220. "VelocityX" double precision NULL,
  221. "VelocityY" double precision NULL,
  222. "VelocityZ" double precision NULL,
  223. "AngularVelocityX" double precision NULL,
  224. "AngularVelocityY" double precision NULL,
  225. "AngularVelocityZ" double precision NULL,
  226. "AccelerationX" double precision NULL,
  227. "AccelerationY" double precision NULL,
  228. "AccelerationZ" double precision NULL,
  229. "RotationX" double precision NULL,
  230. "RotationY" double precision NULL,
  231. "RotationZ" double precision NULL,
  232. "RotationW" double precision NULL,
  233. "SitTargetOffsetX" double precision NULL,
  234. "SitTargetOffsetY" double precision NULL,
  235. "SitTargetOffsetZ" double precision NULL,
  236. "SitTargetOrientW" double precision NULL,
  237. "SitTargetOrientX" double precision NULL,
  238. "SitTargetOrientY" double precision NULL,
  239. "SitTargetOrientZ" double precision NULL
  240. );
  241. INSERT INTO Tmp_prims ("UUID", "RegionUUID", "ParentID", "CreationDate", "Name", "SceneGroupID", "Text", "Description", "SitName", "TouchName", "ObjectFlags", "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", "SitTargetOffsetX", "SitTargetOffsetY", "SitTargetOffsetZ", "SitTargetOrientW", "SitTargetOrientX", "SitTargetOrientY", "SitTargetOrientZ")
  242. SELECT cast("UUID" as varchar(36)), cast("RegionUUID" as varchar(36)), "ParentID", "CreationDate", "Name", cast("SceneGroupID" as varchar(36)), "Text", "Description", "SitName", "TouchName", "ObjectFlags", cast("CreatorID" as varchar(36)), cast("OwnerID" as varchar(36)), cast( "GroupID" as varchar(36)), cast("LastOwnerID" as varchar(36)), "OwnerMask", "NextOwnerMask", "GroupMask", "EveryoneMask", "BaseMask", "PositionX", "PositionY", "PositionZ", "GroupPositionX", "GroupPositionY", "GroupPositionZ", "VelocityX", "VelocityY", "VelocityZ", "AngularVelocityX", "AngularVelocityY", "AngularVelocityZ", "AccelerationX", "AccelerationY", "AccelerationZ", "RotationX", "RotationY", "RotationZ", "RotationW", "SitTargetOffsetX", "SitTargetOffsetY", "SitTargetOffsetZ", "SitTargetOrientW", "SitTargetOrientX", "SitTargetOrientY", "SitTargetOrientZ"
  243. FROM prims ;
  244. DROP TABLE prims;
  245. alter table Tmp_prims rename to prims;
  246. ALTER TABLE prims ADD CONSTRAINT
  247. PK__prims__10566F31 PRIMARY KEY
  248. (
  249. "UUID"
  250. );
  251. COMMIT;
  252. :VERSION 4
  253. BEGIN TRANSACTION;
  254. CREATE TABLE Tmp_primitems
  255. (
  256. "itemID" varchar(36) NOT NULL,
  257. "primID" varchar(36) NULL,
  258. "assetID" varchar(36) NULL,
  259. "parentFolderID" varchar(36) NULL,
  260. "invType" int NULL,
  261. "assetType" int NULL,
  262. "name" varchar(255) NULL,
  263. "description" varchar(255) NULL,
  264. "creationDate" varchar(255) NULL,
  265. "creatorID" varchar(36) NULL,
  266. "ownerID" varchar(36) NULL,
  267. "lastOwnerID" varchar(36) NULL,
  268. "groupID" varchar(36) NULL,
  269. "nextPermissions" int NULL,
  270. "currentPermissions" int NULL,
  271. "basePermissions" int NULL,
  272. "everyonePermissions" int NULL,
  273. "groupPermissions" int NULL
  274. );
  275. INSERT INTO Tmp_primitems ("itemID", "primID", "assetID", "parentFolderID", "invType", "assetType", "name", "description", "creationDate", "creatorID", "ownerID", "lastOwnerID", "groupID", "nextPermissions", "currentPermissions", "basePermissions", "everyonePermissions", "groupPermissions")
  276. SELECT cast("itemID" as varchar(36)), cast("primID" as varchar(36)), cast("assetID" as varchar(36)), cast( "parentFolderID" as varchar(36)), "invType", "assetType", "name", "description", "creationDate", cast( "creatorID" as varchar(36)), cast("ownerID" as varchar(36)), cast("lastOwnerID" as varchar(36)), cast("groupID" as varchar(36)), "nextPermissions", "currentPermissions", "basePermissions", "everyonePermissions", "groupPermissions"
  277. from primitems;
  278. DROP TABLE primitems;
  279. alter table Tmp_primitems rename to primitems;
  280. ALTER TABLE primitems ADD CONSTRAINT
  281. PK__primitems__0A688BB1 PRIMARY KEY
  282. (
  283. "itemID"
  284. );
  285. COMMIT;
  286. :VERSION 5
  287. BEGIN TRANSACTION;
  288. CREATE TABLE Tmp_primshapes
  289. (
  290. "UUID" varchar(36) NOT NULL,
  291. "Shape" int NULL,
  292. "ScaleX" double precision NULL,
  293. "ScaleY" double precision NULL,
  294. "ScaleZ" double precision NULL,
  295. "PCode" int NULL,
  296. "PathBegin" int NULL,
  297. "PathEnd" int NULL,
  298. "PathScaleX" int NULL,
  299. "PathScaleY" int NULL,
  300. "PathShearX" int NULL,
  301. "PathShearY" int NULL,
  302. "PathSkew" int NULL,
  303. "PathCurve" int NULL,
  304. "PathRadiusOffset" int NULL,
  305. "PathRevolutions" int NULL,
  306. "PathTaperX" int NULL,
  307. "PathTaperY" int NULL,
  308. "PathTwist" int NULL,
  309. "PathTwistBegin" int NULL,
  310. "ProfileBegin" int NULL,
  311. "ProfileEnd" int NULL,
  312. "ProfileCurve" int NULL,
  313. "ProfileHollow" int NULL,
  314. "State" int NULL,
  315. "Texture" bytea NULL,
  316. "ExtraParams" bytea NULL
  317. ) ;
  318. INSERT INTO Tmp_primshapes ("UUID", "Shape", "ScaleX", "ScaleY", "ScaleZ", "PCode", "PathBegin", "PathEnd", "PathScaleX", "PathScaleY", "PathShearX", "PathShearY", "PathSkew", "PathCurve", "PathRadiusOffset", "PathRevolutions", "PathTaperX", "PathTaperY", "PathTwist", "PathTwistBegin", "ProfileBegin", "ProfileEnd", "ProfileCurve", "ProfileHollow", "State", "Texture", "ExtraParams")
  319. SELECT cast("UUID" as varchar(36)), "Shape", "ScaleX", "ScaleY", "ScaleZ", "PCode", "PathBegin", "PathEnd", "PathScaleX", "PathScaleY", "PathShearX", "PathShearY", "PathSkew", "PathCurve", "PathRadiusOffset", "PathRevolutions", "PathTaperX", "PathTaperY", "PathTwist", "PathTwistBegin", "ProfileBegin", "ProfileEnd", "ProfileCurve", "ProfileHollow", "State", "Texture", "ExtraParams"
  320. FROM primshapes;
  321. DROP TABLE primshapes;
  322. alter table Tmp_primshapes rename to primshapes;
  323. ALTER TABLE primshapes ADD CONSTRAINT
  324. PK__primshapes__0880433F PRIMARY KEY
  325. (
  326. "UUID"
  327. ) ;
  328. COMMIT;
  329. :VERSION 6
  330. BEGIN TRANSACTION;
  331. ALTER TABLE prims ADD "PayPrice" int not null default 0;
  332. ALTER TABLE prims ADD "PayButton1" int not null default 0;
  333. ALTER TABLE prims ADD "PayButton2" int not null default 0;
  334. ALTER TABLE prims ADD "PayButton3" int not null default 0;
  335. ALTER TABLE prims ADD "PayButton4" int not null default 0;
  336. ALTER TABLE prims ADD "LoopedSound" varchar(36) not null default '00000000-0000-0000-0000-000000000000';
  337. ALTER TABLE prims ADD "LoopedSoundGain" double precision not null default 0.0;
  338. ALTER TABLE prims ADD "TextureAnimation" bytea;
  339. ALTER TABLE prims ADD "OmegaX" double precision not null default 0.0;
  340. ALTER TABLE prims ADD "OmegaY" double precision not null default 0.0;
  341. ALTER TABLE prims ADD "OmegaZ" double precision not null default 0.0;
  342. ALTER TABLE prims ADD "CameraEyeOffsetX" double precision not null default 0.0;
  343. ALTER TABLE prims ADD "CameraEyeOffsetY" double precision not null default 0.0;
  344. ALTER TABLE prims ADD "CameraEyeOffsetZ" double precision not null default 0.0;
  345. ALTER TABLE prims ADD "CameraAtOffsetX" double precision not null default 0.0;
  346. ALTER TABLE prims ADD "CameraAtOffsetY" double precision not null default 0.0;
  347. ALTER TABLE prims ADD "CameraAtOffsetZ" double precision not null default 0.0;
  348. ALTER TABLE prims ADD "ForceMouselook" smallint not null default 0;
  349. ALTER TABLE prims ADD "ScriptAccessPin" int not null default 0;
  350. ALTER TABLE prims ADD "AllowedDrop" smallint not null default 0;
  351. ALTER TABLE prims ADD "DieAtEdge" smallint not null default 0;
  352. ALTER TABLE prims ADD "SalePrice" int not null default 10;
  353. ALTER TABLE prims ADD "SaleType" smallint not null default 0;
  354. ALTER TABLE primitems add "flags" integer not null default 0;
  355. ALTER TABLE land ADD "AuthbuyerID" varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
  356. CREATE index prims_regionuuid on prims("RegionUUID");
  357. CREATE index prims_parentid on prims("ParentID");
  358. CREATE index primitems_primid on primitems("primID");
  359. COMMIT;
  360. :VERSION 7
  361. BEGIN TRANSACTION;
  362. ALTER TABLE prims ADD "ColorR" int not null default 0;
  363. ALTER TABLE prims ADD "ColorG" int not null default 0;
  364. ALTER TABLE prims ADD "ColorB" int not null default 0;
  365. ALTER TABLE prims ADD "ColorA" int not null default 0;
  366. ALTER TABLE prims ADD "ParticleSystem" bytea;
  367. ALTER TABLE prims ADD "ClickAction" smallint NOT NULL default 0;
  368. COMMIT;
  369. :VERSION 8
  370. BEGIN TRANSACTION;
  371. ALTER TABLE land ADD "OtherCleanTime" integer NOT NULL default 0;
  372. ALTER TABLE land ADD "Dwell" integer NOT NULL default 0;
  373. COMMIT;
  374. :VERSION 9
  375. BEGIN TRANSACTION;
  376. ALTER TABLE prims ADD "Material" smallint NOT NULL default 3;
  377. COMMIT;
  378. :VERSION 10
  379. BEGIN TRANSACTION;
  380. ALTER TABLE regionsettings ADD "sunvectorx" double precision NOT NULL default 0;
  381. ALTER TABLE regionsettings ADD "sunvectory" double precision NOT NULL default 0;
  382. ALTER TABLE regionsettings ADD "sunvectorz" double precision NOT NULL default 0;
  383. COMMIT;
  384. :VERSION 11
  385. BEGIN TRANSACTION;
  386. ALTER TABLE prims ADD "CollisionSound" char(36) not null default '00000000-0000-0000-0000-000000000000';
  387. ALTER TABLE prims ADD "CollisionSoundVolume" double precision not null default 0.0;
  388. COMMIT;
  389. :VERSION 12
  390. BEGIN TRANSACTION;
  391. ALTER TABLE prims ADD "LinkNumber" integer not null default 0;
  392. COMMIT;
  393. :VERSION 13
  394. BEGIN TRANSACTION;
  395. CREATE TABLE Tmp_prims
  396. (
  397. "UUID" uuid NOT NULL,
  398. "RegionUUID" uuid NULL,
  399. "ParentID" int NULL,
  400. "CreationDate" int NULL,
  401. "Name" varchar(255) NULL,
  402. "SceneGroupID" uuid NULL,
  403. "Text" varchar(255) NULL,
  404. "Description" varchar(255) NULL,
  405. "SitName" varchar(255) NULL,
  406. "TouchName" varchar(255) NULL,
  407. "ObjectFlags" int NULL,
  408. "CreatorID" uuid NULL,
  409. "OwnerID" uuid NULL,
  410. "GroupID" uuid NULL,
  411. "LastOwnerID" uuid NULL,
  412. "OwnerMask" int NULL,
  413. "NextOwnerMask" int NULL,
  414. "GroupMask" int NULL,
  415. "EveryoneMask" int NULL,
  416. "BaseMask" int NULL,
  417. "PositionX" double precision NULL,
  418. "PositionY" double precision NULL,
  419. "PositionZ" double precision NULL,
  420. "GroupPositionX" double precision NULL,
  421. "GroupPositionY" double precision NULL,
  422. "GroupPositionZ" double precision NULL,
  423. "VelocityX" double precision NULL,
  424. "VelocityY" double precision NULL,
  425. "VelocityZ" double precision NULL,
  426. "AngularVelocityX" double precision NULL,
  427. "AngularVelocityY" double precision NULL,
  428. "AngularVelocityZ" double precision NULL,
  429. "AccelerationX" double precision NULL,
  430. "AccelerationY" double precision NULL,
  431. "AccelerationZ" double precision NULL,
  432. "RotationX" double precision NULL,
  433. "RotationY" double precision NULL,
  434. "RotationZ" double precision NULL,
  435. "RotationW" double precision NULL,
  436. "SitTargetOffsetX" double precision NULL,
  437. "SitTargetOffsetY" double precision NULL,
  438. "SitTargetOffsetZ" double precision NULL,
  439. "SitTargetOrientW" double precision NULL,
  440. "SitTargetOrientX" double precision NULL,
  441. "SitTargetOrientY" double precision NULL,
  442. "SitTargetOrientZ" double precision NULL,
  443. "PayPrice" int NOT NULL DEFAULT ((0)),
  444. "PayButton1" int NOT NULL DEFAULT ((0)),
  445. "PayButton2" int NOT NULL DEFAULT ((0)),
  446. "PayButton3" int NOT NULL DEFAULT ((0)),
  447. "PayButton4" int NOT NULL DEFAULT ((0)),
  448. "LoopedSound" uuid NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
  449. "LoopedSoundGain" double precision NOT NULL DEFAULT ((0.0)),
  450. "TextureAnimation" bytea NULL,
  451. "OmegaX" double precision NOT NULL DEFAULT ((0.0)),
  452. "OmegaY" double precision NOT NULL DEFAULT ((0.0)),
  453. "OmegaZ" double precision NOT NULL DEFAULT ((0.0)),
  454. "CameraEyeOffsetX" double precision NOT NULL DEFAULT ((0.0)),
  455. "CameraEyeOffsetY" double precision NOT NULL DEFAULT ((0.0)),
  456. "CameraEyeOffsetZ" double precision NOT NULL DEFAULT ((0.0)),
  457. "CameraAtOffsetX" double precision NOT NULL DEFAULT ((0.0)),
  458. "CameraAtOffsetY" double precision NOT NULL DEFAULT ((0.0)),
  459. "CameraAtOffsetZ" double precision NOT NULL DEFAULT ((0.0)),
  460. "ForceMouselook" smallint NOT NULL DEFAULT ((0)),
  461. "ScriptAccessPin" int NOT NULL DEFAULT ((0)),
  462. "AllowedDrop" smallint NOT NULL DEFAULT ((0)),
  463. "DieAtEdge" smallint NOT NULL DEFAULT ((0)),
  464. "SalePrice" int NOT NULL DEFAULT ((10)),
  465. "SaleType" smallint NOT NULL DEFAULT ((0)),
  466. "ColorR" int NOT NULL DEFAULT ((0)),
  467. "ColorG" int NOT NULL DEFAULT ((0)),
  468. "ColorB" int NOT NULL DEFAULT ((0)),
  469. "ColorA" int NOT NULL DEFAULT ((0)),
  470. "ParticleSystem" bytea NULL,
  471. "ClickAction" smallint NOT NULL DEFAULT ((0)),
  472. "Material" smallint NOT NULL DEFAULT ((3)),
  473. "CollisionSound" uuid NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
  474. "CollisionSoundVolume" double precision NOT NULL DEFAULT ((0.0)),
  475. "LinkNumber" int NOT NULL DEFAULT ((0))
  476. );
  477. INSERT INTO Tmp_prims ("UUID", "RegionUUID", "ParentID", "CreationDate", "Name", "SceneGroupID", "Text", "Description", "SitName", "TouchName", "ObjectFlags", "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", "SitTargetOffsetX", "SitTargetOffsetY", "SitTargetOffsetZ", "SitTargetOrientW", "SitTargetOrientX", "SitTargetOrientY", "SitTargetOrientZ", "PayPrice", "PayButton1", "PayButton2", "PayButton3", "PayButton4", "LoopedSound", "LoopedSoundGain", "TextureAnimation", "OmegaX", "OmegaY", "OmegaZ", "CameraEyeOffsetX", "CameraEyeOffsetY", "CameraEyeOffsetZ", "CameraAtOffsetX", "CameraAtOffsetY", "CameraAtOffsetZ", "ForceMouselook", "ScriptAccessPin", "AllowedDrop", "DieAtEdge", "SalePrice", "SaleType", "ColorR", "ColorG", "ColorB", "ColorA", "ParticleSystem", "ClickAction", "Material", "CollisionSound", "CollisionSoundVolume", "LinkNumber")
  478. SELECT cast("UUID" as uuid), cast("RegionUUID" as uuid), "ParentID", "CreationDate", "Name", cast("SceneGroupID" as uuid), "Text", "Description", "SitName", "TouchName", "ObjectFlags", cast("CreatorID" as uuid), cast("OwnerID" as uuid), cast("GroupID" as uuid), cast("LastOwnerID" as uuid), "OwnerMask", "NextOwnerMask", "GroupMask", "EveryoneMask", "BaseMask", "PositionX", "PositionY", "PositionZ", "GroupPositionX", "GroupPositionY", "GroupPositionZ", "VelocityX", "VelocityY", "VelocityZ", "AngularVelocityX", "AngularVelocityY", "AngularVelocityZ", "AccelerationX", "AccelerationY", "AccelerationZ", "RotationX", "RotationY", "RotationZ", "RotationW", "SitTargetOffsetX", "SitTargetOffsetY", "SitTargetOffsetZ", "SitTargetOrientW", "SitTargetOrientX", "SitTargetOrientY", "SitTargetOrientZ", "PayPrice", "PayButton1", "PayButton2", "PayButton3", "PayButton4", cast("LoopedSound" as uuid), "LoopedSoundGain", "TextureAnimation", "OmegaX", "OmegaY", "OmegaZ", "CameraEyeOffsetX", "CameraEyeOffsetY", "CameraEyeOffsetZ", "CameraAtOffsetX", "CameraAtOffsetY", "CameraAtOffsetZ", "ForceMouselook", "ScriptAccessPin", "AllowedDrop", "DieAtEdge", "SalePrice", "SaleType", "ColorR", "ColorG", "ColorB", "ColorA", "ParticleSystem", "ClickAction", "Material", cast("CollisionSound" as uuid), "CollisionSoundVolume", "LinkNumber"
  479. FROM prims ;
  480. DROP TABLE prims;
  481. alter table Tmp_prims rename to prims;
  482. ALTER TABLE prims ADD CONSTRAINT
  483. PK__prims__10566F31 PRIMARY KEY
  484. (
  485. "UUID"
  486. );
  487. CREATE INDEX prims_regionuuid ON prims
  488. (
  489. "RegionUUID"
  490. );
  491. CREATE INDEX prims_parentid ON prims
  492. (
  493. "ParentID"
  494. );
  495. COMMIT;
  496. :VERSION 14
  497. BEGIN TRANSACTION;
  498. CREATE TABLE Tmp_primshapes
  499. (
  500. "UUID" uuid NOT NULL,
  501. "Shape" int NULL,
  502. "ScaleX" double precision NULL,
  503. "ScaleY" double precision NULL,
  504. "ScaleZ" double precision NULL,
  505. "PCode" int NULL,
  506. "PathBegin" int NULL,
  507. "PathEnd" int NULL,
  508. "PathScaleX" int NULL,
  509. "PathScaleY" int NULL,
  510. "PathShearX" int NULL,
  511. "PathShearY" int NULL,
  512. "PathSkew" int NULL,
  513. "PathCurve" int NULL,
  514. "PathRadiusOffset" int NULL,
  515. "PathRevolutions" int NULL,
  516. "PathTaperX" int NULL,
  517. "PathTaperY" int NULL,
  518. "PathTwist" int NULL,
  519. "PathTwistBegin" int NULL,
  520. "ProfileBegin" int NULL,
  521. "ProfileEnd" int NULL,
  522. "ProfileCurve" int NULL,
  523. "ProfileHollow" int NULL,
  524. "State" int NULL,
  525. "Texture" bytea NULL,
  526. "ExtraParams" bytea NULL
  527. );
  528. INSERT INTO Tmp_primshapes ("UUID", "Shape", "ScaleX", "ScaleY", "ScaleZ", "PCode", "PathBegin", "PathEnd", "PathScaleX", "PathScaleY", "PathShearX", "PathShearY", "PathSkew", "PathCurve", "PathRadiusOffset", "PathRevolutions", "PathTaperX", "PathTaperY", "PathTwist", "PathTwistBegin", "ProfileBegin", "ProfileEnd", "ProfileCurve", "ProfileHollow", "State", "Texture", "ExtraParams")
  529. SELECT cast("UUID" as uuid), "Shape", "ScaleX", "ScaleY", "ScaleZ", "PCode", "PathBegin", "PathEnd", "PathScaleX", "PathScaleY", "PathShearX", "PathShearY", "PathSkew", "PathCurve", "PathRadiusOffset", "PathRevolutions", "PathTaperX", "PathTaperY", "PathTwist", "PathTwistBegin", "ProfileBegin", "ProfileEnd", "ProfileCurve", "ProfileHollow", "State", "Texture", "ExtraParams"
  530. FROM primshapes;
  531. DROP TABLE primshapes;
  532. alter table Tmp_primshapes rename to primshapes;
  533. ALTER TABLE primshapes ADD CONSTRAINT
  534. PK__primshapes__0880433F PRIMARY KEY
  535. (
  536. "UUID"
  537. );
  538. COMMIT;
  539. :VERSION 15
  540. BEGIN TRANSACTION;
  541. CREATE TABLE Tmp_primitems
  542. (
  543. "itemID" uuid NOT NULL,
  544. "primID" uuid NULL,
  545. "assetID" uuid NULL,
  546. "parentFolderID" uuid NULL,
  547. "invType" int NULL,
  548. "assetType" int NULL,
  549. "name" varchar(255) NULL,
  550. "description" varchar(255) NULL,
  551. "creationDate" varchar(255) NULL,
  552. "creatorID" uuid NULL,
  553. "ownerID" uuid NULL,
  554. "lastOwnerID" uuid NULL,
  555. "groupID" uuid NULL,
  556. "nextPermissions" int NULL,
  557. "currentPermissions" int NULL,
  558. "basePermissions" int NULL,
  559. "everyonePermissions" int NULL,
  560. "groupPermissions" int NULL,
  561. flags int NOT NULL DEFAULT ((0))
  562. );
  563. INSERT INTO Tmp_primitems ("itemID", "primID", "assetID", "parentFolderID", "invType", "assetType", "name", "description", "creationDate", "creatorID", "ownerID", "lastOwnerID", "groupID", "nextPermissions", "currentPermissions", "basePermissions", "everyonePermissions", "groupPermissions", flags)
  564. SELECT cast("itemID" as uuid), cast("primID" as uuid), cast("assetID" as uuid), cast("parentFolderID" as uuid), "invType", "assetType", "name", "description", "creationDate", cast("creatorID" as uuid), cast("ownerID" as uuid), cast("lastOwnerID" as uuid), cast("groupID" as uuid), "nextPermissions", "currentPermissions", "basePermissions", "everyonePermissions", "groupPermissions", flags
  565. FROM primitems ;
  566. DROP TABLE primitems;
  567. alter table Tmp_primitems rename to primitems;
  568. ALTER TABLE primitems ADD CONSTRAINT
  569. PK__primitems__0A688BB1 PRIMARY KEY
  570. (
  571. "itemID"
  572. );
  573. CREATE INDEX primitems_primid ON primitems
  574. (
  575. "primID"
  576. ) ;
  577. COMMIT;
  578. :VERSION 16
  579. BEGIN TRANSACTION;
  580. CREATE TABLE Tmp_terrain
  581. (
  582. "RegionUUID" uuid NULL,
  583. "Revision" int NULL,
  584. "Heightfield" bytea NULL
  585. );
  586. INSERT INTO Tmp_terrain ("RegionUUID", "Revision", "Heightfield")
  587. SELECT cast("RegionUUID" as uuid), "Revision", "Heightfield"
  588. FROM terrain ;
  589. DROP TABLE terrain;
  590. alter table Tmp_terrain rename to terrain;
  591. COMMIT;
  592. :VERSION 17
  593. BEGIN TRANSACTION;
  594. CREATE TABLE Tmp_land
  595. (
  596. "UUID" uuid NOT NULL,
  597. "RegionUUID" uuid NULL,
  598. "LocalLandID" int NULL,
  599. "Bitmap" bytea NULL,
  600. "Name" varchar(255) NULL,
  601. "Description" varchar(255) NULL,
  602. "OwnerUUID" uuid NULL,
  603. "IsGroupOwned" boolean NULL,
  604. "Area" int NULL,
  605. "AuctionID" int NULL,
  606. "Category" int NULL,
  607. "ClaimDate" int NULL,
  608. "ClaimPrice" int NULL,
  609. "GroupUUID" uuid NULL,
  610. "SalePrice" int NULL,
  611. "LandStatus" int NULL,
  612. "LandFlags" int NULL,
  613. "LandingType" int NULL,
  614. "MediaAutoScale" int NULL,
  615. "MediaTextureUUID" uuid NULL,
  616. "MediaURL" varchar(255) NULL,
  617. "MusicURL" varchar(255) NULL,
  618. "PassHours" double precision NULL,
  619. "PassPrice" int NULL,
  620. "SnapshotUUID" uuid NULL,
  621. "UserLocationX" double precision NULL,
  622. "UserLocationY" double precision NULL,
  623. "UserLocationZ" double precision NULL,
  624. "UserLookAtX" double precision NULL,
  625. "UserLookAtY" double precision NULL,
  626. "UserLookAtZ" double precision NULL,
  627. "AuthbuyerID" uuid NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
  628. "OtherCleanTime" int NOT NULL DEFAULT ((0)),
  629. "Dwell" int NOT NULL DEFAULT ((0))
  630. );
  631. INSERT INTO Tmp_land ("UUID", "RegionUUID", "LocalLandID", "Bitmap", "Name", "Description", "OwnerUUID", "IsGroupOwned", "Area", "AuctionID", "Category", "ClaimDate", "ClaimPrice", "GroupUUID", "SalePrice", "LandStatus", "LandFlags", "LandingType", "MediaAutoScale", "MediaTextureUUID", "MediaURL", "MusicURL", "PassHours", "PassPrice", "SnapshotUUID", "UserLocationX", "UserLocationY", "UserLocationZ", "UserLookAtX", "UserLookAtY", "UserLookAtZ", "AuthbuyerID", "OtherCleanTime", "Dwell")
  632. SELECT cast("UUID" as uuid), cast("RegionUUID" as uuid), "LocalLandID", "Bitmap", "Name", "Description", cast("OwnerUUID" as uuid), "IsGroupOwned", "Area", "AuctionID", "Category", "ClaimDate", "ClaimPrice", cast("GroupUUID" as uuid), "SalePrice", "LandStatus", "LandFlags", "LandingType", "MediaAutoScale", cast("MediaTextureUUID" as uuid), "MediaURL", "MusicURL", "PassHours", "PassPrice", cast("SnapshotUUID" as uuid), "UserLocationX", "UserLocationY", "UserLocationZ", "UserLookAtX", "UserLookAtY", "UserLookAtZ", cast("AuthbuyerID" as uuid), "OtherCleanTime", "Dwell"
  633. FROM land ;
  634. DROP TABLE land;
  635. alter table Tmp_land rename to land;
  636. ALTER TABLE land ADD CONSTRAINT
  637. PK__land__65A475E71BFD2C07 PRIMARY KEY
  638. (
  639. "UUID"
  640. );
  641. Create index on land (lower("Name"));
  642. COMMIT;
  643. :VERSION 18
  644. BEGIN TRANSACTION;
  645. CREATE TABLE Tmp_landaccesslist
  646. (
  647. "LandUUID" uuid NULL,
  648. "AccessUUID" uuid NULL,
  649. "Flags" int NULL
  650. );
  651. INSERT INTO Tmp_landaccesslist ("LandUUID", "AccessUUID", "Flags")
  652. SELECT cast("LandUUID" as uuid), cast("AccessUUID" as uuid), "Flags"
  653. FROM landaccesslist ;
  654. DROP TABLE landaccesslist;
  655. alter table Tmp_landaccesslist rename to landaccesslist;
  656. COMMIT;
  657. :VERSION 19
  658. BEGIN TRANSACTION;
  659. CREATE TABLE Tmp_regionban
  660. (
  661. "regionUUID" uuid NOT NULL,
  662. "bannedUUID" uuid NOT NULL,
  663. "bannedIp" varchar(16) NOT NULL,
  664. "bannedIpHostMask" varchar(16) NOT NULL
  665. );
  666. INSERT INTO Tmp_regionban ("regionUUID", "bannedUUID", "bannedIp", "bannedIpHostMask")
  667. SELECT cast("regionUUID" as uuid), cast("bannedUUID" as uuid), "bannedIp", "bannedIpHostMask"
  668. FROM regionban ;
  669. DROP TABLE regionban;
  670. alter table Tmp_regionban rename to regionban;
  671. COMMIT;
  672. :VERSION 20
  673. BEGIN TRANSACTION;
  674. CREATE TABLE Tmp_regionsettings
  675. (
  676. "regionUUID" uuid NOT NULL,
  677. "block_terraform" boolean NOT NULL,
  678. "block_fly" boolean NOT NULL,
  679. "allow_damage" boolean NOT NULL,
  680. "restrict_pushing" boolean NOT NULL,
  681. "allow_land_resell" boolean NOT NULL,
  682. "allow_land_join_divide" boolean NOT NULL,
  683. "block_show_in_search" boolean NOT NULL,
  684. "agent_limit" int NOT NULL,
  685. "object_bonus" double precision NOT NULL,
  686. "maturity" int NOT NULL,
  687. "disable_scripts" boolean NOT NULL,
  688. "disable_collisions" boolean NOT NULL,
  689. "disable_physics" boolean NOT NULL,
  690. "terrain_texture_1" uuid NOT NULL,
  691. "terrain_texture_2" uuid NOT NULL,
  692. "terrain_texture_3" uuid NOT NULL,
  693. "terrain_texture_4" uuid NOT NULL,
  694. "elevation_1_nw" double precision NOT NULL,
  695. "elevation_2_nw" double precision NOT NULL,
  696. "elevation_1_ne" double precision NOT NULL,
  697. "elevation_2_ne" double precision NOT NULL,
  698. "elevation_1_se" double precision NOT NULL,
  699. "elevation_2_se" double precision NOT NULL,
  700. "elevation_1_sw" double precision NOT NULL,
  701. "elevation_2_sw" double precision NOT NULL,
  702. "water_height" double precision NOT NULL,
  703. "terrain_raise_limit" double precision NOT NULL,
  704. "terrain_lower_limit" double precision NOT NULL,
  705. "use_estate_sun" boolean NOT NULL,
  706. "fixed_sun" boolean NOT NULL,
  707. "sun_position" double precision NOT NULL,
  708. "covenant" uuid NULL DEFAULT (NULL),
  709. "Sandbox" boolean NOT NULL,
  710. "sunvectorx" double precision NOT NULL DEFAULT ((0)),
  711. "sunvectory" double precision NOT NULL DEFAULT ((0)),
  712. "sunvectorz" double precision NOT NULL DEFAULT ((0))
  713. );
  714. INSERT INTO Tmp_regionsettings ("regionUUID", "block_terraform", "block_fly", "allow_damage", "restrict_pushing", "allow_land_resell", "allow_land_join_divide", "block_show_in_search", "agent_limit", "object_bonus", "maturity", "disable_scripts", "disable_collisions", "disable_physics", "terrain_texture_1", "terrain_texture_2", "terrain_texture_3", "terrain_texture_4", "elevation_1_nw", "elevation_2_nw", "elevation_1_ne", "elevation_2_ne", "elevation_1_se", "elevation_2_se", "elevation_1_sw", "elevation_2_sw", "water_height", "terrain_raise_limit", "terrain_lower_limit", "use_estate_sun", "fixed_sun", "sun_position", "covenant", "Sandbox", "sunvectorx", "sunvectory", "sunvectorz")
  715. SELECT cast("regionUUID" as uuid), "block_terraform", "block_fly", "allow_damage", "restrict_pushing", "allow_land_resell", "allow_land_join_divide", "block_show_in_search", "agent_limit", "object_bonus", "maturity", "disable_scripts", "disable_collisions", "disable_physics", cast("terrain_texture_1" as uuid), cast("terrain_texture_2" as uuid), cast("terrain_texture_3" as uuid), cast("terrain_texture_4" as uuid), "elevation_1_nw", "elevation_2_nw", "elevation_1_ne", "elevation_2_ne", "elevation_1_se", "elevation_2_se", "elevation_1_sw", "elevation_2_sw", "water_height", "terrain_raise_limit", "terrain_lower_limit", "use_estate_sun", "fixed_sun", "sun_position", cast("covenant" as uuid), "Sandbox", "sunvectorx", "sunvectory", "sunvectorz"
  716. FROM regionsettings ;
  717. DROP TABLE regionsettings;
  718. alter table Tmp_regionsettings rename to regionsettings;
  719. ALTER TABLE regionsettings ADD CONSTRAINT
  720. PK__regionse__5B35159D21B6055D PRIMARY KEY
  721. (
  722. "regionUUID"
  723. );
  724. COMMIT;
  725. :VERSION 21
  726. BEGIN TRANSACTION;
  727. ALTER TABLE prims ADD "PassTouches" boolean not null default false;
  728. COMMIT;
  729. :VERSION 22
  730. BEGIN TRANSACTION;
  731. ALTER TABLE regionsettings ADD "loaded_creation_date" varchar(20) ;
  732. ALTER TABLE regionsettings ADD "loaded_creation_time" varchar(20) ;
  733. ALTER TABLE regionsettings ADD "loaded_creation_id" varchar(64) ;
  734. COMMIT;
  735. :VERSION 23
  736. BEGIN TRANSACTION;
  737. ALTER TABLE regionsettings DROP COLUMN "loaded_creation_date";
  738. ALTER TABLE regionsettings DROP COLUMN "loaded_creation_time";
  739. ALTER TABLE regionsettings ADD "loaded_creation_datetime" int NOT NULL default 0;
  740. COMMIT;
  741. :VERSION 24
  742. BEGIN TRANSACTION;
  743. ALTER TABLE prims ADD "MediaURL" varchar(255);
  744. ALTER TABLE primshapes ADD "Media" TEXT NULL;
  745. COMMIT;
  746. :VERSION 25
  747. BEGIN TRANSACTION;
  748. CREATE TABLE regionwindlight (
  749. "region_id" varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000' PRIMARY KEY,
  750. "water_color_r" double precision NOT NULL DEFAULT '4.000000',
  751. water_color_g double precision NOT NULL DEFAULT '38.000000',
  752. water_color_b double precision NOT NULL DEFAULT '64.000000',
  753. water_fog_density_exponent double precision NOT NULL DEFAULT '4.0',
  754. underwater_fog_modifier double precision NOT NULL DEFAULT '0.25',
  755. reflection_wavelet_scale_1 double precision NOT NULL DEFAULT '2.0',
  756. reflection_wavelet_scale_2 double precision NOT NULL DEFAULT '2.0',
  757. reflection_wavelet_scale_3 double precision NOT NULL DEFAULT '2.0',
  758. fresnel_scale double precision NOT NULL DEFAULT '0.40',
  759. fresnel_offset double precision NOT NULL DEFAULT '0.50',
  760. refract_scale_above double precision NOT NULL DEFAULT '0.03',
  761. refract_scale_below double precision NOT NULL DEFAULT '0.20',
  762. blur_multiplier double precision NOT NULL DEFAULT '0.040',
  763. big_wave_direction_x double precision NOT NULL DEFAULT '1.05',
  764. big_wave_direction_y double precision NOT NULL DEFAULT '-0.42',
  765. little_wave_direction_x double precision NOT NULL DEFAULT '1.11',
  766. little_wave_direction_y double precision NOT NULL DEFAULT '-1.16',
  767. normal_map_texture varchar(36) NOT NULL DEFAULT '822ded49-9a6c-f61c-cb89-6df54f42cdf4',
  768. horizon_r double precision NOT NULL DEFAULT '0.25',
  769. horizon_g double precision NOT NULL DEFAULT '0.25',
  770. horizon_b double precision NOT NULL DEFAULT '0.32',
  771. horizon_i double precision NOT NULL DEFAULT '0.32',
  772. haze_horizon double precision NOT NULL DEFAULT '0.19',
  773. blue_density_r double precision NOT NULL DEFAULT '0.12',
  774. blue_density_g double precision NOT NULL DEFAULT '0.22',
  775. blue_density_b double precision NOT NULL DEFAULT '0.38',
  776. blue_density_i double precision NOT NULL DEFAULT '0.38',
  777. haze_density double precision NOT NULL DEFAULT '0.70',
  778. density_multiplier double precision NOT NULL DEFAULT '0.18',
  779. distance_multiplier double precision NOT NULL DEFAULT '0.8',
  780. max_altitude int NOT NULL DEFAULT '1605',
  781. sun_moon_color_r double precision NOT NULL DEFAULT '0.24',
  782. sun_moon_color_g double precision NOT NULL DEFAULT '0.26',
  783. sun_moon_color_b double precision NOT NULL DEFAULT '0.30',
  784. sun_moon_color_i double precision NOT NULL DEFAULT '0.30',
  785. sun_moon_position double precision NOT NULL DEFAULT '0.317',
  786. ambient_r double precision NOT NULL DEFAULT '0.35',
  787. ambient_g double precision NOT NULL DEFAULT '0.35',
  788. ambient_b double precision NOT NULL DEFAULT '0.35',
  789. ambient_i double precision NOT NULL DEFAULT '0.35',
  790. east_angle double precision NOT NULL DEFAULT '0.00',
  791. sun_glow_focus double precision NOT NULL DEFAULT '0.10',
  792. sun_glow_size double precision NOT NULL DEFAULT '1.75',
  793. scene_gamma double precision NOT NULL DEFAULT '1.00',
  794. star_brightness double precision NOT NULL DEFAULT '0.00',
  795. cloud_color_r double precision NOT NULL DEFAULT '0.41',
  796. cloud_color_g double precision NOT NULL DEFAULT '0.41',
  797. cloud_color_b double precision NOT NULL DEFAULT '0.41',
  798. cloud_color_i double precision NOT NULL DEFAULT '0.41',
  799. cloud_x double precision NOT NULL DEFAULT '1.00',
  800. cloud_y double precision NOT NULL DEFAULT '0.53',
  801. cloud_density double precision NOT NULL DEFAULT '1.00',
  802. cloud_coverage double precision NOT NULL DEFAULT '0.27',
  803. cloud_scale double precision NOT NULL DEFAULT '0.42',
  804. cloud_detail_x double precision NOT NULL DEFAULT '1.00',
  805. cloud_detail_y double precision NOT NULL DEFAULT '0.53',
  806. cloud_detail_density double precision NOT NULL DEFAULT '0.12',
  807. cloud_scroll_x double precision NOT NULL DEFAULT '0.20',
  808. cloud_scroll_x_lock smallint NOT NULL DEFAULT '0',
  809. cloud_scroll_y double precision NOT NULL DEFAULT '0.01',
  810. cloud_scroll_y_lock smallint NOT NULL DEFAULT '0',
  811. draw_classic_clouds smallint NOT NULL DEFAULT '1'
  812. );
  813. COMMIT;
  814. :VERSION 26
  815. BEGIN TRANSACTION;
  816. ALTER TABLE regionsettings ADD "map_tile_ID" CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
  817. COMMIT;
  818. :VERSION 27 #---------------------
  819. BEGIN TRANSACTION;
  820. ALTER TABLE land ADD "MediaType" VARCHAR(32) NOT NULL DEFAULT 'none/none' ;
  821. ALTER TABLE land ADD "MediaDescription" VARCHAR(255) NOT NULL DEFAULT '';
  822. ALTER TABLE land ADD "MediaSize" VARCHAR(16) NOT NULL DEFAULT '0,0';
  823. ALTER TABLE land ADD "MediaLoop" boolean NOT NULL DEFAULT false;
  824. ALTER TABLE land ADD "ObscureMusic" boolean NOT NULL DEFAULT false;
  825. ALTER TABLE land ADD "ObscureMedia" boolean NOT NULL DEFAULT false;
  826. COMMIT;
  827. :VERSION 28 #---------------------
  828. BEGIN TRANSACTION;
  829. ALTER TABLE prims
  830. alter column "CreatorID" set DEFAULT '00000000-0000-0000-0000-000000000000' ;
  831. ALTER TABLE prims ALTER COLUMN "CreatorID" set NOT NULL;
  832. ALTER TABLE primitems
  833. alter column "creatorID" set DEFAULT '00000000-0000-0000-0000-000000000000' ;
  834. ALTER TABLE primitems ALTER COLUMN "creatorID" set NOT NULL;
  835. COMMIT;
  836. :VERSION 29 #----------------- Region Covenant changed time
  837. BEGIN TRANSACTION;
  838. ALTER TABLE regionsettings ADD "covenant_datetime" int NOT NULL default 0;
  839. COMMIT;
  840. :VERSION 30 #------------------Migrate "creatorID" storage to varchars instead of UUIDs for HG support
  841. BEGIN TRANSACTION;
  842. alter table prims rename column "CreatorID" to "CreatorIDOld";
  843. alter table primitems rename column "creatorID" to "creatorIDOld";
  844. COMMIT;
  845. :VERSION 31 #---------------------
  846. BEGIN TRANSACTION;
  847. ALTER TABLE prims ADD "CreatorID" varchar(255);
  848. ALTER TABLE primitems ADD "creatorID" varchar(255);
  849. COMMIT;
  850. :VERSION 32 #---------------------
  851. BEGIN TRANSACTION;
  852. UPDATE prims SET "CreatorID" = cast("CreatorIDOld" as varchar(255));
  853. UPDATE primitems SET "creatorID" = cast("creatorIDOld" as varchar(255));
  854. COMMIT;
  855. :VERSION 33 #---------------------
  856. BEGIN TRANSACTION;
  857. ALTER TABLE prims alter column "CreatorID" set default '00000000-0000-0000-0000-000000000000' ;
  858. ALTER TABLE prims ALTER COLUMN "CreatorID" set NOT NULL;
  859. ALTER TABLE primitems alter column "creatorID" set DEFAULT '00000000-0000-0000-0000-000000000000' ;
  860. ALTER TABLE primitems ALTER COLUMN "creatorID" set NOT NULL;
  861. COMMIT;
  862. :VERSION 34 #--------------- Telehub support
  863. BEGIN TRANSACTION;
  864. CREATE TABLE spawn_points(
  865. "RegionUUID" uuid NOT NULL PRIMARY KEY,
  866. "Yaw" double precision NOT NULL,
  867. "Pitch" double precision NOT NULL,
  868. "Distance" double precision NOT NULL
  869. );
  870. ALTER TABLE regionsettings ADD "TelehubObject" uuid NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
  871. COMMIT;
  872. :VERSION 35 #---------------- Parcels for sale
  873. BEGIN TRANSACTION;
  874. ALTER TABLE regionsettings ADD "parcel_tile_ID" uuid NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
  875. COMMIT;
  876. :VERSION 36 #---------------- Timed bans/access
  877. BEGIN TRANSACTION;
  878. ALTER TABLE landaccesslist ADD "Expires" integer NOT NULL DEFAULT 0;
  879. COMMIT;
  880. :VERSION 37 #---------------- Environment Settings
  881. BEGIN TRANSACTION;
  882. CREATE TABLE regionenvironment(
  883. "region_id" uuid NOT NULL primary key,
  884. "llsd_settings" varchar NOT NULL
  885. );
  886. COMMIT;
  887. :VERSION 38 #---------------- Dynamic attributes
  888. BEGIN TRANSACTION;
  889. ALTER TABLE prims ADD "DynAttrs" TEXT;
  890. COMMIT;
  891. :VERSION 39 #---------------- Extra physics params
  892. BEGIN TRANSACTION;
  893. ALTER TABLE prims ADD "PhysicsShapeType" smallint NOT NULL default '0';
  894. ALTER TABLE prims ADD "Density" double precision NOT NULL default '1000';
  895. ALTER TABLE prims ADD "GravityModifier" double precision NOT NULL default '1';
  896. ALTER TABLE prims ADD "Friction" double precision NOT NULL default '0.6';
  897. ALTER TABLE prims ADD "Restitution" double precision NOT NULL default '0.5';
  898. COMMIT;
  899. :VERSION 40 #-- regionwindlight changed type from smallint to bool
  900. BEGIN TRANSACTION;
  901. ALTER TABLE regionwindlight ALTER COLUMN cloud_scroll_x_lock DROP DEFAULT;
  902. ALTER TABLE regionwindlight ALTER cloud_scroll_x_lock TYPE bool USING CASE WHEN cloud_scroll_x_lock=0 THEN FALSE ELSE TRUE END;
  903. ALTER TABLE regionwindlight ALTER COLUMN cloud_scroll_x_lock SET DEFAULT FALSE;
  904. ALTER TABLE regionwindlight ALTER COLUMN cloud_scroll_y_lock DROP DEFAULT;
  905. ALTER TABLE regionwindlight ALTER cloud_scroll_y_lock TYPE bool USING CASE WHEN cloud_scroll_y_lock=0 THEN FALSE ELSE TRUE END;
  906. ALTER TABLE regionwindlight ALTER COLUMN cloud_scroll_y_lock SET DEFAULT FALSE;
  907. ALTER TABLE regionwindlight ALTER COLUMN draw_classic_clouds DROP DEFAULT;
  908. ALTER TABLE regionwindlight ALTER draw_classic_clouds TYPE bool USING CASE WHEN draw_classic_clouds=0 THEN FALSE ELSE TRUE END;
  909. ALTER TABLE regionwindlight ALTER COLUMN draw_classic_clouds SET DEFAULT FALSE;
  910. COMMIT;
  911. VERSION 41 #-- Change Landlags to bigint
  912. BEGIN TRANSACTION;
  913. ALTER TABLE land ALTER "LandFlags" TYPE bigint;
  914. COMMIT;