RegionStore.migrations 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257
  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;
  915. :VERSION 42 #-- avination fields
  916. BEGIN TRANSACTION;
  917. ALTER TABLE prims ADD "PassCollisions" smallint NOT NULL DEFAULT (0);
  918. ALTER TABLE prims ADD "Vehicle" text COLLATE "default";
  919. ALTER TABLE regionsettings ADD "block_search" smallint NOT NULL DEFAULT (0);
  920. ALTER TABLE regionsettings ADD "casino" smallint NOT NULL DEFAULT (0);
  921. ALTER TABLE land ADD "SeeAVs" smallint NOT NULL DEFAULT (1);
  922. ALTER TABLE land ADD "AnyAVSounds" smallint NOT NULL DEFAULT (1);
  923. ALTER TABLE land ADD "GroupAVSounds" smallint NOT NULL DEFAULT (1);
  924. COMMIT;
  925. :VERSION 43 #---- STATUS ROTATION axis locks
  926. BEGIN TRANSACTION;
  927. ALTER TABLE prims ADD "RotationAxisLocks" smallint NOT NULL DEFAULT (0);
  928. COMMIT;
  929. :VERSION 44 #---- add baked terrain store
  930. BEGIN TRANSACTION;
  931. CREATE TABLE bakedterrain
  932. (
  933. "RegionUUID" uuid NULL,
  934. "Revision" int NULL,
  935. "Heightfield" bytea NULL
  936. );
  937. COMMIT;
  938. :VERSION 45 #---- Add RezzerID filed in table prims
  939. BEGIN TRANSACTION;
  940. ALTER TABLE prims ADD "RezzerID" uuid NULL;
  941. COMMIT;
  942. :VERSION 46 #---- Add physics inertia data to table prims
  943. BEGIN TRANSACTION;
  944. ALTER TABLE prims ADD "PhysInertia" TEXT;
  945. COMMIT;
  946. :VERSION 47 #---- Convert field PassCollisions in table prims to BOOLEAN
  947. BEGIN TRANSACTION;
  948. ALTER TABLE "public"."prims" ALTER COLUMN "PassCollisions" DROP DEFAULT;
  949. ALTER TABLE "public"."prims"
  950. ALTER COLUMN "PassCollisions" TYPE BOOLEAN
  951. USING CASE WHEN "PassCollisions" = 0 THEN FALSE
  952. WHEN "PassCollisions" = 1 THEN TRUE
  953. ELSE NULL
  954. END;
  955. COMMIT;
  956. :VERSION 48 #---- field Vehicle to table prims
  957. BEGIN TRANSACTION;
  958. ALTER TABLE prims ADD "Vehicle" TEXT;
  959. COMMIT;
  960. :VERSION 49 #----- Add standtarget and sit range
  961. BEGIN;
  962. ALTER TABLE `prims`
  963. ADD COLUMN `standtargetx` real DEFAULT '0.0',
  964. ADD COLUMN `standtargety` real DEFAULT '0.0',
  965. ADD COLUMN `standtargetz` real DEFAULT '0.0',
  966. ADD COLUMN `sitactrange` real DEFAULT '0.0';
  967. COMMIT;
  968. :VERSION 50 #----- Add pseudo CRC and region cache id
  969. BEGIN;
  970. ALTER TABLE `prims` ADD COLUMN `pseudocrc` integer DEFAULT '0';
  971. ALTER TABLE `regionsettings` ADD COLUMN `cacheID` uuid DEFAULT NULL;
  972. COMMIT;
  973. :VERSION 51 #----- parcel environment store
  974. BEGIN;
  975. ALTER TABLE `land` ADD COLUMN `environment` varchar default NULL;
  976. COMMIT;