RegionStore.migrations 41 KB

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