RegionStore.migrations 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. :VERSION 31
  2. BEGIN TRANSACTION;
  3. CREATE TABLE IF NOT EXISTS prims(
  4. UUID varchar(255) primary key,
  5. RegionUUID varchar(255),
  6. CreationDate integer,
  7. Name varchar(255),
  8. SceneGroupID varchar(255),
  9. Text varchar(255),
  10. Description varchar(255),
  11. SitName varchar(255),
  12. TouchName varchar(255),
  13. CreatorID varchar(255),
  14. OwnerID varchar(255),
  15. GroupID varchar(255),
  16. LastOwnerID varchar(255),
  17. OwnerMask integer,
  18. NextOwnerMask integer,
  19. GroupMask integer,
  20. EveryoneMask integer,
  21. BaseMask integer,
  22. PositionX float,
  23. PositionY float,
  24. PositionZ float,
  25. GroupPositionX float,
  26. GroupPositionY float,
  27. GroupPositionZ float,
  28. VelocityX float,
  29. VelocityY float,
  30. VelocityZ float,
  31. AngularVelocityX float,
  32. AngularVelocityY float,
  33. AngularVelocityZ float,
  34. AccelerationX float,
  35. AccelerationY float,
  36. AccelerationZ float,
  37. RotationX float,
  38. RotationY float,
  39. RotationZ float,
  40. RotationW float,
  41. ObjectFlags integer,
  42. SitTargetOffsetX float NOT NULL default 0,
  43. SitTargetOffsetY float NOT NULL default 0,
  44. SitTargetOffsetZ float NOT NULL default 0,
  45. SitTargetOrientW float NOT NULL default 0,
  46. SitTargetOrientX float NOT NULL default 0,
  47. SitTargetOrientY float NOT NULL default 0,
  48. SitTargetOrientZ float NOT NULL default 0,
  49. ColorR integer not null default 0,
  50. ColorG integer not null default 0,
  51. ColorB integer not null default 0,
  52. ColorA integer not null default 0,
  53. ClickAction integer not null default 0,
  54. PayPrice integer not null default 0,
  55. PayButton1 integer not null default 0,
  56. PayButton2 integer not null default 0,
  57. PayButton3 integer not null default 0,
  58. PayButton4 integer not null default 0,
  59. LoopedSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
  60. LoopedSoundGain float NOT NULL default 0,
  61. TextureAnimation string,
  62. ParticleSystem string,
  63. OmegaX float NOT NULL default 0,
  64. OmegaY float NOT NULL default 0,
  65. OmegaZ float NOT NULL default 0,
  66. CameraEyeOffsetX float NOT NULL default 0,
  67. CameraEyeOffsetY float NOT NULL default 0,
  68. CameraEyeOffsetZ float NOT NULL default 0,
  69. CameraAtOffsetX float NOT NULL default 0,
  70. CameraAtOffsetY float NOT NULL default 0,
  71. CameraAtOffsetZ float NOT NULL default 0,
  72. ForceMouselook string NOT NULL default 0,
  73. ScriptAccessPin INTEGER NOT NULL default 0,
  74. AllowedDrop INTEGER NOT NULL default 0,
  75. DieAtEdge string NOT NULL default 0,
  76. SalePrice INTEGER NOT NULL default 0,
  77. SaleType string NOT NULL default 0,
  78. Material INTEGER NOT NULL default 3,
  79. CollisionSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
  80. CollisionSoundVolume float NOT NULL default 0,
  81. VolumeDetect INTEGER NOT NULL DEFAULT 0,
  82. MediaURL varchar(255),
  83. DynAttrs TEXT,
  84. `PhysicsShapeType` tinyint(4) NOT NULL default '0',
  85. `Density` double NOT NULL default '1000',
  86. `GravityModifier` double NOT NULL default '1',
  87. `Friction` double NOT NULL default '0.6',
  88. `Restitution` double NOT NULL default '0.5',
  89. `KeyframeMotion` blob,
  90. AttachedPosX double default '0',
  91. AttachedPosY double default '0',
  92. AttachedPosZ double default '0');
  93. CREATE TABLE IF NOT EXISTS primshapes(
  94. UUID varchar(255) primary key,
  95. Shape integer,
  96. ScaleX float,
  97. ScaleY float,
  98. ScaleZ float,
  99. PCode integer,
  100. PathBegin integer,
  101. PathEnd integer,
  102. PathScaleX integer,
  103. PathScaleY integer,
  104. PathShearX integer,
  105. PathShearY integer,
  106. PathSkew integer,
  107. PathCurve integer,
  108. PathRadiusOffset integer,
  109. PathRevolutions integer,
  110. PathTaperX integer,
  111. PathTaperY integer,
  112. PathTwist integer,
  113. PathTwistBegin integer,
  114. ProfileBegin integer,
  115. ProfileEnd integer,
  116. ProfileCurve integer,
  117. ProfileHollow integer,
  118. Texture blob,
  119. ExtraParams blob,
  120. State Integer NOT NULL default 0,
  121. Media TEXT,
  122. LastAttachPoint int not null default '0');
  123. CREATE TABLE IF NOT EXISTS primitems(
  124. itemID varchar(255) primary key,
  125. primID varchar(255),
  126. assetID varchar(255),
  127. parentFolderID varchar(255),
  128. invType integer,
  129. assetType integer,
  130. name varchar(255),
  131. description varchar(255),
  132. creationDate integer,
  133. creatorID varchar(255),
  134. ownerID varchar(255),
  135. lastOwnerID varchar(255),
  136. groupID varchar(255),
  137. nextPermissions string,
  138. currentPermissions string,
  139. basePermissions string,
  140. everyonePermissions string,
  141. groupPermissions string,
  142. flags integer not null default 0);
  143. CREATE TABLE IF NOT EXISTS terrain(
  144. RegionUUID varchar(255),
  145. Revision integer,
  146. Heightfield blob);
  147. CREATE TABLE IF NOT EXISTS land(
  148. UUID varchar(255) primary key,
  149. RegionUUID varchar(255),
  150. LocalLandID string,
  151. Bitmap blob,
  152. Name varchar(255),
  153. Desc varchar(255),
  154. OwnerUUID varchar(255),
  155. IsGroupOwned string,
  156. Area integer,
  157. AuctionID integer,
  158. Category integer,
  159. ClaimDate integer,
  160. ClaimPrice integer,
  161. GroupUUID varchar(255),
  162. SalePrice integer,
  163. LandStatus integer,
  164. LandFlags string,
  165. LandingType string,
  166. MediaAutoScale string,
  167. MediaTextureUUID varchar(255),
  168. MediaURL varchar(255),
  169. MusicURL varchar(255),
  170. PassHours float,
  171. PassPrice string,
  172. SnapshotUUID varchar(255),
  173. UserLocationX float,
  174. UserLocationY float,
  175. UserLocationZ float,
  176. UserLookAtX float,
  177. UserLookAtY float,
  178. UserLookAtZ float,
  179. AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
  180. OtherCleanTime INTEGER NOT NULL default 0,
  181. Dwell INTEGER NOT NULL default 0,
  182. `MediaType` VARCHAR(32) NOT NULL DEFAULT 'none/none',
  183. `MediaDescription` VARCHAR(255) NOT NULL DEFAULT '',
  184. `MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0',
  185. `MediaLoop` BOOLEAN NOT NULL DEFAULT FALSE,
  186. `ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE,
  187. `ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE);
  188. CREATE TABLE IF NOT EXISTS landaccesslist(
  189. LandUUID varchar(255),
  190. AccessUUID varchar(255),
  191. Flags string);
  192. CREATE TABLE IF NOT EXISTS regionban(
  193. regionUUID varchar (255),
  194. bannedUUID varchar (255),
  195. bannedIp varchar (255),
  196. bannedIpHostMask varchar (255)
  197. );
  198. CREATE TABLE IF NOT EXISTS regionsettings (
  199. regionUUID char(36) NOT NULL,
  200. block_terraform int(11) NOT NULL,
  201. block_fly int(11) NOT NULL,
  202. allow_damage int(11) NOT NULL,
  203. restrict_pushing int(11) NOT NULL,
  204. allow_land_resell int(11) NOT NULL,
  205. allow_land_join_divide int(11) NOT NULL,
  206. block_show_in_search int(11) NOT NULL,
  207. agent_limit int(11) NOT NULL,
  208. object_bonus float NOT NULL,
  209. maturity int(11) NOT NULL,
  210. disable_scripts int(11) NOT NULL,
  211. disable_collisions int(11) NOT NULL,
  212. disable_physics int(11) NOT NULL,
  213. terrain_texture_1 char(36) NOT NULL,
  214. terrain_texture_2 char(36) NOT NULL,
  215. terrain_texture_3 char(36) NOT NULL,
  216. terrain_texture_4 char(36) NOT NULL,
  217. elevation_1_nw float NOT NULL,
  218. elevation_2_nw float NOT NULL,
  219. elevation_1_ne float NOT NULL,
  220. elevation_2_ne float NOT NULL,
  221. elevation_1_se float NOT NULL,
  222. elevation_2_se float NOT NULL,
  223. elevation_1_sw float NOT NULL,
  224. elevation_2_sw float NOT NULL,
  225. water_height float NOT NULL,
  226. terrain_raise_limit float NOT NULL,
  227. terrain_lower_limit float NOT NULL,
  228. use_estate_sun int(11) NOT NULL,
  229. fixed_sun int(11) NOT NULL,
  230. sun_position float NOT NULL,
  231. covenant char(36) default NULL,
  232. sandbox tinyint(4) NOT NULL,
  233. sunvectorx double NOT NULL default 0,
  234. sunvectory double NOT NULL default 0,
  235. sunvectorz double NOT NULL default 0,
  236. map_tile_ID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
  237. covenant_datetime INTEGER NOT NULL default 0,
  238. `TelehubObject` varchar(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
  239. `parcel_tile_ID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
  240. PRIMARY KEY (regionUUID)
  241. );
  242. CREATE TABLE IF NOT EXISTS regionwindlight (
  243. region_id VARCHAR(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000' PRIMARY KEY,
  244. water_color_r FLOAT NOT NULL DEFAULT '4.000000',
  245. water_color_g FLOAT NOT NULL DEFAULT '38.000000',
  246. water_color_b FLOAT NOT NULL DEFAULT '64.000000',
  247. water_color_i FLOAT NOT NULL DEFAULT '1.000000',
  248. water_fog_density_exponent FLOAT NOT NULL DEFAULT '4.0',
  249. underwater_fog_modifier FLOAT NOT NULL DEFAULT '0.25',
  250. reflection_wavelet_scale_1 FLOAT NOT NULL DEFAULT '2.0',
  251. reflection_wavelet_scale_2 FLOAT NOT NULL DEFAULT '2.0',
  252. reflection_wavelet_scale_3 FLOAT NOT NULL DEFAULT '2.0',
  253. fresnel_scale FLOAT NOT NULL DEFAULT '0.40',
  254. fresnel_offset FLOAT NOT NULL DEFAULT '0.50',
  255. refract_scale_above FLOAT NOT NULL DEFAULT '0.03',
  256. refract_scale_below FLOAT NOT NULL DEFAULT '0.20',
  257. blur_multiplier FLOAT NOT NULL DEFAULT '0.040',
  258. big_wave_direction_x FLOAT NOT NULL DEFAULT '1.05',
  259. big_wave_direction_y FLOAT NOT NULL DEFAULT '-0.42',
  260. little_wave_direction_x FLOAT NOT NULL DEFAULT '1.11',
  261. little_wave_direction_y FLOAT NOT NULL DEFAULT '-1.16',
  262. normal_map_texture VARCHAR(36) NOT NULL DEFAULT '822ded49-9a6c-f61c-cb89-6df54f42cdf4',
  263. horizon_r FLOAT NOT NULL DEFAULT '0.25',
  264. horizon_g FLOAT NOT NULL DEFAULT '0.25',
  265. horizon_b FLOAT NOT NULL DEFAULT '0.32',
  266. horizon_i FLOAT NOT NULL DEFAULT '0.32',
  267. haze_horizon FLOAT NOT NULL DEFAULT '0.19',
  268. blue_density_r FLOAT NOT NULL DEFAULT '0.12',
  269. blue_density_g FLOAT NOT NULL DEFAULT '0.22',
  270. blue_density_b FLOAT NOT NULL DEFAULT '0.38',
  271. blue_density_i FLOAT NOT NULL DEFAULT '0.38',
  272. haze_density FLOAT NOT NULL DEFAULT '0.70',
  273. density_multiplier FLOAT NOT NULL DEFAULT '0.18',
  274. distance_multiplier FLOAT NOT NULL DEFAULT '0.8',
  275. max_altitude INTEGER NOT NULL DEFAULT '1605',
  276. sun_moon_color_r FLOAT NOT NULL DEFAULT '0.24',
  277. sun_moon_color_g FLOAT NOT NULL DEFAULT '0.26',
  278. sun_moon_color_b FLOAT NOT NULL DEFAULT '0.30',
  279. sun_moon_color_i FLOAT NOT NULL DEFAULT '0.30',
  280. sun_moon_position FLOAT NOT NULL DEFAULT '0.317',
  281. ambient_r FLOAT NOT NULL DEFAULT '0.35',
  282. ambient_g FLOAT NOT NULL DEFAULT '0.35',
  283. ambient_b FLOAT NOT NULL DEFAULT '0.35',
  284. ambient_i FLOAT NOT NULL DEFAULT '0.35',
  285. east_angle FLOAT NOT NULL DEFAULT '0.00',
  286. sun_glow_focus FLOAT NOT NULL DEFAULT '0.10',
  287. sun_glow_size FLOAT NOT NULL DEFAULT '1.75',
  288. scene_gamma FLOAT NOT NULL DEFAULT '1.00',
  289. star_brightness FLOAT NOT NULL DEFAULT '0.00',
  290. cloud_color_r FLOAT NOT NULL DEFAULT '0.41',
  291. cloud_color_g FLOAT NOT NULL DEFAULT '0.41',
  292. cloud_color_b FLOAT NOT NULL DEFAULT '0.41',
  293. cloud_color_i FLOAT NOT NULL DEFAULT '0.41',
  294. cloud_x FLOAT NOT NULL DEFAULT '1.00',
  295. cloud_y FLOAT NOT NULL DEFAULT '0.53',
  296. cloud_density FLOAT NOT NULL DEFAULT '1.00',
  297. cloud_coverage FLOAT NOT NULL DEFAULT '0.27',
  298. cloud_scale FLOAT NOT NULL DEFAULT '0.42',
  299. cloud_detail_x FLOAT NOT NULL DEFAULT '1.00',
  300. cloud_detail_y FLOAT NOT NULL DEFAULT '0.53',
  301. cloud_detail_density FLOAT NOT NULL DEFAULT '0.12',
  302. cloud_scroll_x FLOAT NOT NULL DEFAULT '0.20',
  303. cloud_scroll_x_lock INTEGER NOT NULL DEFAULT '0',
  304. cloud_scroll_y FLOAT NOT NULL DEFAULT '0.01',
  305. cloud_scroll_y_lock INTEGER NOT NULL DEFAULT '0',
  306. draw_classic_clouds INTEGER NOT NULL DEFAULT '1');
  307. CREATE TABLE IF NOT EXISTS `spawn_points` (
  308. `RegionID` varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000',
  309. `Yaw` float NOT NULL,
  310. `Pitch` float NOT NULL,
  311. `Distance` float NOT NULL
  312. );
  313. CREATE TABLE IF NOT EXISTS `regionenvironment` (
  314. `region_id` varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000' PRIMARY KEY,
  315. `llsd_settings` TEXT NOT NULL
  316. );
  317. COMMIT;
  318. :VERSION 32 #---- avination fields plus a few others
  319. BEGIN;
  320. ALTER TABLE `prims` ADD COLUMN `PassTouches` BOOLEAN NOT NULL DEFAULT FALSE;
  321. ALTER TABLE `prims` ADD COLUMN `PassCollisions`BOOLEAN NOT NULL DEFAULT FALSE;
  322. ALTER TABLE `prims` ADD COLUMN `Vehicle` TEXT default NULL;
  323. ALTER TABLE `regionsettings` ADD COLUMN `block_search` BOOLEAN NOT NULL DEFAULT FALSE;;
  324. ALTER TABLE `regionsettings` ADD COLUMN `casino` BOOLEAN NOT NULL DEFAULT FALSE;;
  325. ALTER TABLE `land` ADD COLUMN `SeeAVs` BOOLEAN NOT NULL DEFAULT TRUE;
  326. ALTER TABLE `land` ADD COLUMN `AnyAVSounds` BOOLEAN NOT NULL DEFAULT TRUE;
  327. ALTER TABLE `land` ADD COLUMN `GroupAVSounds` BOOLEAN NOT NULL DEFAULT TRUE;
  328. COMMIT;
  329. :VERSION 33 #---- Rotation axis locks
  330. BEGIN;
  331. ALTER TABLE prims ADD COLUMN `RotationAxisLocks` tinyint(4) NOT NULL default '0';
  332. COMMIT;
  333. :VERSION 34 #---- add baked terrain store
  334. BEGIN;
  335. CREATE TABLE IF NOT EXISTS bakedterrain(
  336. RegionUUID varchar(255),
  337. Revision integer,
  338. Heightfield blob);
  339. COMMIT;
  340. :VERSION 35 #----- Add RezzerID field in table prims
  341. BEGIN;
  342. ALTER TABLE `prims` ADD COLUMN `RezzerID` char(36) DEFAULT NULL;
  343. COMMIT;
  344. :VERSION 36 #----- Add physics inertia data
  345. BEGIN;
  346. ALTER TABLE `prims` ADD COLUMN `PhysInertia` TEXT default NULL;
  347. COMMIT;
  348. :VERSION 37 #----- Add standtarget and sit range
  349. BEGIN;
  350. ALTER TABLE `prims` ADD COLUMN `standtargetx` float NOT NULL DEFAULT '0.0';
  351. ALTER TABLE `prims` ADD COLUMN `standtargety` float NOT NULL DEFAULT '0.0';
  352. ALTER TABLE `prims` ADD COLUMN `standtargetz` float NOT NULL DEFAULT '0.0';
  353. ALTER TABLE `prims` ADD COLUMN `sitactrange` float NOT NULL DEFAULT '0.0';
  354. COMMIT;
  355. :VERSION 38 #----- Add pseudo CRC and region cache id
  356. BEGIN;
  357. ALTER TABLE `prims` ADD COLUMN `pseudocrc` integer DEFAULT '0';
  358. ALTER TABLE `regionsettings` ADD COLUMN `cacheID` char(36) DEFAULT NULL;
  359. COMMIT;
  360. :VERSION 39 #----- parcel environment store
  361. BEGIN;
  362. ALTER TABLE `land` ADD COLUMN `environment` TEXT default NULL;
  363. COMMIT;
  364. :VERSION 40 #----- sop animations and materials
  365. BEGIN;
  366. ALTER TABLE `prims` ADD COLUMN `sopanims` blob default NULL;
  367. ALTER TABLE `primshapes` ADD COLUMN `MatOvrd` blob default NULL;
  368. COMMIT;