aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/Resources
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-11-03 21:44:39 +1000
committerDavid Walter Seikel2016-11-03 21:44:39 +1000
commit134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch)
tree216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Data/MSSQL/Resources
parentMore changing to production grid. Double oops. (diff)
downloadopensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip
opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz
opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2
opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources')
-rw-r--r--OpenSim/Data/MSSQL/Resources/AssetStore.migrations106
-rw-r--r--OpenSim/Data/MSSQL/Resources/AuthStore.migrations32
-rw-r--r--OpenSim/Data/MSSQL/Resources/Avatar.migrations64
-rw-r--r--OpenSim/Data/MSSQL/Resources/EstateStore.migrations334
-rw-r--r--OpenSim/Data/MSSQL/Resources/FriendsStore.migrations50
-rw-r--r--OpenSim/Data/MSSQL/Resources/GridStore.migrations245
-rw-r--r--OpenSim/Data/MSSQL/Resources/GridUserStore.migrations65
-rw-r--r--OpenSim/Data/MSSQL/Resources/InventoryStore.migrations279
-rw-r--r--OpenSim/Data/MSSQL/Resources/LogStore.migrations19
-rw-r--r--OpenSim/Data/MSSQL/Resources/Presence.migrations31
-rw-r--r--OpenSim/Data/MSSQL/Resources/RegionStore.migrations1150
-rw-r--r--OpenSim/Data/MSSQL/Resources/UserAccount.migrations55
-rw-r--r--OpenSim/Data/MSSQL/Resources/UserStore.migrations421
13 files changed, 0 insertions, 2851 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/AssetStore.migrations b/OpenSim/Data/MSSQL/Resources/AssetStore.migrations
deleted file mode 100644
index 8664ce9..0000000
--- a/OpenSim/Data/MSSQL/Resources/AssetStore.migrations
+++ /dev/null
@@ -1,106 +0,0 @@
1:VERSION 1
2
3CREATE TABLE [assets] (
4 [id] [varchar](36) NOT NULL,
5 [name] [varchar](64) NOT NULL,
6 [description] [varchar](64) NOT NULL,
7 [assetType] [tinyint] NOT NULL,
8 [local] [tinyint] NOT NULL,
9 [temporary] [tinyint] NOT NULL,
10 [data] [image] NOT NULL,
11PRIMARY KEY CLUSTERED
12(
13 [id] ASC
14)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
15) ON [PRIMARY]
16
17
18:VERSION 2
19
20BEGIN TRANSACTION
21
22CREATE TABLE Tmp_assets
23 (
24 id varchar(36) NOT NULL,
25 name varchar(64) NOT NULL,
26 description varchar(64) NOT NULL,
27 assetType tinyint NOT NULL,
28 local bit NOT NULL,
29 temporary bit NOT NULL,
30 data image NOT NULL
31 ) ON [PRIMARY]
32 TEXTIMAGE_ON [PRIMARY]
33
34IF EXISTS(SELECT * FROM assets)
35 EXEC('INSERT INTO Tmp_assets (id, name, description, assetType, local, temporary, data)
36 SELECT id, name, description, assetType, CONVERT(bit, local), CONVERT(bit, temporary), data FROM assets WITH (HOLDLOCK TABLOCKX)')
37
38DROP TABLE assets
39
40EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT'
41
42ALTER TABLE dbo.assets ADD CONSTRAINT
43 PK__assets__id PRIMARY KEY CLUSTERED
44 (
45 id
46 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
47
48COMMIT
49
50
51:VERSION 3
52
53BEGIN TRANSACTION
54
55ALTER TABLE assets add create_time integer default 0
56ALTER TABLE assets add access_time integer default 0
57
58COMMIT
59
60
61:VERSION 4
62
63BEGIN TRANSACTION
64
65CREATE TABLE dbo.Tmp_assets
66 (
67 id uniqueidentifier NOT NULL,
68 name varchar(64) NOT NULL,
69 description varchar(64) NOT NULL,
70 assetType tinyint NOT NULL,
71 local bit NOT NULL,
72 temporary bit NOT NULL,
73 data image NOT NULL,
74 create_time int NULL,
75 access_time int NULL
76 ) ON [PRIMARY]
77 TEXTIMAGE_ON [PRIMARY]
78
79IF EXISTS(SELECT * FROM dbo.assets)
80 EXEC('INSERT INTO dbo.Tmp_assets (id, name, description, assetType, local, temporary, data, create_time, access_time)
81 SELECT CONVERT(uniqueidentifier, id), name, description, assetType, local, temporary, data, create_time, access_time FROM dbo.assets WITH (HOLDLOCK TABLOCKX)')
82
83DROP TABLE assets
84
85EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT'
86
87ALTER TABLE dbo.assets ADD CONSTRAINT
88 PK__assets__id PRIMARY KEY CLUSTERED
89 (
90 id
91 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
92
93COMMIT
94
95
96:VERSION 5
97
98DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621';
99
100:VERSION 6
101
102ALTER TABLE assets ADD asset_flags INTEGER NOT NULL DEFAULT 0;
103
104:VERSION 7
105
106alter table assets add creatorid varchar(36) not null default '';
diff --git a/OpenSim/Data/MSSQL/Resources/AuthStore.migrations b/OpenSim/Data/MSSQL/Resources/AuthStore.migrations
deleted file mode 100644
index eb91296..0000000
--- a/OpenSim/Data/MSSQL/Resources/AuthStore.migrations
+++ /dev/null
@@ -1,32 +0,0 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [auth] (
6 [uuid] [uniqueidentifier] NOT NULL default '00000000-0000-0000-0000-000000000000',
7 [passwordHash] [varchar](32) NOT NULL,
8 [passwordSalt] [varchar](32) NOT NULL,
9 [webLoginKey] [varchar](255) NOT NULL,
10 [accountType] VARCHAR(32) NOT NULL DEFAULT 'UserAccount',
11) ON [PRIMARY]
12
13CREATE TABLE [tokens] (
14 [uuid] [uniqueidentifier] NOT NULL default '00000000-0000-0000-0000-000000000000',
15 [token] [varchar](255) NOT NULL,
16 [validity] [datetime] NOT NULL )
17 ON [PRIMARY]
18
19COMMIT
20
21:VERSION 2
22
23BEGIN TRANSACTION
24
25IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users]') AND type in (N'U'))
26 INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey, accountType) SELECT [UUID] AS UUID, [passwordHash] AS passwordHash, [passwordSalt] AS passwordSalt, [webLoginKey] AS webLoginKey, 'UserAccount' as [accountType] FROM users;
27
28COMMIT
29
30
31
32
diff --git a/OpenSim/Data/MSSQL/Resources/Avatar.migrations b/OpenSim/Data/MSSQL/Resources/Avatar.migrations
deleted file mode 100644
index 61f7b56..0000000
--- a/OpenSim/Data/MSSQL/Resources/Avatar.migrations
+++ /dev/null
@@ -1,64 +0,0 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [Avatars] (
6[PrincipalID] uniqueidentifier NOT NULL,
7[Name] varchar(32) NOT NULL,
8[Value] varchar(255) NOT NULL DEFAULT '',
9PRIMARY KEY CLUSTERED
10(
11 [PrincipalID] ASC, [Name] ASC
12)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
13) ON [PRIMARY]
14
15
16COMMIT
17
18:VERSION 2
19
20BEGIN TRANSACTION
21
22CREATE TABLE dbo.Tmp_Avatars
23 (
24 PrincipalID uniqueidentifier NOT NULL,
25 [Name] varchar(32) NOT NULL,
26 Value text NOT NULL DEFAULT '',
27 ) ON [PRIMARY]
28 TEXTIMAGE_ON [PRIMARY]
29
30IF EXISTS(SELECT * FROM dbo.Avatars)
31 EXEC('INSERT INTO dbo.Tmp_Avatars (PrincipalID, Name, Value)
32 SELECT PrincipalID, CONVERT(text, Name), Value FROM dbo.Avatars WITH (HOLDLOCK TABLOCKX)')
33
34DROP TABLE dbo.Avatars
35
36EXECUTE sp_rename N'dbo.Tmp_Avatars', N'Avatars', 'OBJECT'
37
38COMMIT
39
40:VERSION 3
41
42BEGIN TRANSACTION
43
44CREATE TABLE dbo.Tmp_Avatars
45 (
46 PrincipalID uniqueidentifier NOT NULL,
47 [Name] varchar(32) NOT NULL,
48 Value text NOT NULL DEFAULT '',
49 PRIMARY KEY CLUSTERED
50(
51 [PrincipalID] ASC, [Name] ASC
52)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
53) ON [PRIMARY]
54 TEXTIMAGE_ON [PRIMARY]
55
56IF EXISTS(SELECT * FROM dbo.Avatars)
57 EXEC('INSERT INTO dbo.Tmp_Avatars (PrincipalID, Name, Value)
58 SELECT PrincipalID, CONVERT(text, Name), Value FROM dbo.Avatars WITH (HOLDLOCK TABLOCKX)')
59
60DROP TABLE dbo.Avatars
61
62EXECUTE sp_rename N'dbo.Tmp_Avatars', N'Avatars', 'OBJECT'
63COMMIT
64
diff --git a/OpenSim/Data/MSSQL/Resources/EstateStore.migrations b/OpenSim/Data/MSSQL/Resources/EstateStore.migrations
deleted file mode 100644
index 64b2d2b..0000000
--- a/OpenSim/Data/MSSQL/Resources/EstateStore.migrations
+++ /dev/null
@@ -1,334 +0,0 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [dbo].[estate_managers](
6 [EstateID] [int] NOT NULL,
7 [uuid] [varchar](36) NOT NULL,
8 CONSTRAINT [PK_estate_managers] PRIMARY KEY CLUSTERED
9(
10 [EstateID] ASC
11)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
12) ON [PRIMARY];
13
14CREATE TABLE [dbo].[estate_groups](
15 [EstateID] [int] NOT NULL,
16 [uuid] [varchar](36) NOT NULL,
17 CONSTRAINT [PK_estate_groups] PRIMARY KEY CLUSTERED
18(
19 [EstateID] ASC
20)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
21) ON [PRIMARY];
22
23
24CREATE TABLE [dbo].[estate_users](
25 [EstateID] [int] NOT NULL,
26 [uuid] [varchar](36) NOT NULL,
27 CONSTRAINT [PK_estate_users] PRIMARY KEY CLUSTERED
28(
29 [EstateID] ASC
30)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
31) ON [PRIMARY];
32
33
34CREATE TABLE [dbo].[estateban](
35 [EstateID] [int] NOT NULL,
36 [bannedUUID] [varchar](36) NOT NULL,
37 [bannedIp] [varchar](16) NOT NULL,
38 [bannedIpHostMask] [varchar](16) NOT NULL,
39 [bannedNameMask] [varchar](64) NULL DEFAULT (NULL),
40 CONSTRAINT [PK_estateban] PRIMARY KEY CLUSTERED
41(
42 [EstateID] ASC
43)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
44) ON [PRIMARY];
45
46CREATE TABLE [dbo].[estate_settings](
47 [EstateID] [int] IDENTITY(1,100) NOT NULL,
48 [EstateName] [varchar](64) NULL DEFAULT (NULL),
49 [AbuseEmailToEstateOwner] [bit] NOT NULL,
50 [DenyAnonymous] [bit] NOT NULL,
51 [ResetHomeOnTeleport] [bit] NOT NULL,
52 [FixedSun] [bit] NOT NULL,
53 [DenyTransacted] [bit] NOT NULL,
54 [BlockDwell] [bit] NOT NULL,
55 [DenyIdentified] [bit] NOT NULL,
56 [AllowVoice] [bit] NOT NULL,
57 [UseGlobalTime] [bit] NOT NULL,
58 [PricePerMeter] [int] NOT NULL,
59 [TaxFree] [bit] NOT NULL,
60 [AllowDirectTeleport] [bit] NOT NULL,
61 [RedirectGridX] [int] NOT NULL,
62 [RedirectGridY] [int] NOT NULL,
63 [ParentEstateID] [int] NOT NULL,
64 [SunPosition] [float] NOT NULL,
65 [EstateSkipScripts] [bit] NOT NULL,
66 [BillableFactor] [float] NOT NULL,
67 [PublicAccess] [bit] NOT NULL,
68 [AbuseEmail] [varchar](255) NOT NULL,
69 [EstateOwner] [varchar](36) NOT NULL,
70 [DenyMinors] [bit] NOT NULL,
71 CONSTRAINT [PK_estate_settings] PRIMARY KEY CLUSTERED
72(
73 [EstateID] ASC
74)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
75) ON [PRIMARY];
76
77
78CREATE TABLE [dbo].[estate_map](
79 [RegionID] [varchar](36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
80 [EstateID] [int] NOT NULL,
81 CONSTRAINT [PK_estate_map] PRIMARY KEY CLUSTERED
82(
83 [RegionID] ASC
84)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
85) ON [PRIMARY];
86
87COMMIT
88
89:VERSION 2
90
91BEGIN TRANSACTION
92
93ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers
94
95CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
96 (
97 EstateID
98 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
99
100ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups
101
102CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
103 (
104 EstateID
105 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
106
107
108ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users
109
110CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
111 (
112 EstateID
113 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
114
115COMMIT
116
117
118:VERSION 3
119
120BEGIN TRANSACTION
121
122CREATE TABLE dbo.Tmp_estateban
123 (
124 EstateID int NOT NULL,
125 bannedUUID varchar(36) NOT NULL,
126 bannedIp varchar(16) NULL,
127 bannedIpHostMask varchar(16) NULL,
128 bannedNameMask varchar(64) NULL
129 ) ON [PRIMARY]
130
131IF EXISTS(SELECT * FROM dbo.estateban)
132 EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
133 SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban')
134
135DROP TABLE dbo.estateban
136
137EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
138
139CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
140 (
141 EstateID
142 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
143
144COMMIT
145
146
147:VERSION 4
148
149BEGIN TRANSACTION
150
151CREATE TABLE dbo.Tmp_estate_managers
152 (
153 EstateID int NOT NULL,
154 uuid uniqueidentifier NOT NULL
155 ) ON [PRIMARY]
156
157IF EXISTS(SELECT * FROM dbo.estate_managers)
158 EXEC('INSERT INTO dbo.Tmp_estate_managers (EstateID, uuid)
159 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_managers WITH (HOLDLOCK TABLOCKX)')
160
161DROP TABLE dbo.estate_managers
162
163EXECUTE sp_rename N'dbo.Tmp_estate_managers', N'estate_managers', 'OBJECT'
164
165CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
166 (
167 EstateID
168 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
169
170COMMIT
171
172
173:VERSION 5
174
175BEGIN TRANSACTION
176
177CREATE TABLE dbo.Tmp_estate_groups
178 (
179 EstateID int NOT NULL,
180 uuid uniqueidentifier NOT NULL
181 ) ON [PRIMARY]
182
183IF EXISTS(SELECT * FROM dbo.estate_groups)
184 EXEC('INSERT INTO dbo.Tmp_estate_groups (EstateID, uuid)
185 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_groups WITH (HOLDLOCK TABLOCKX)')
186
187DROP TABLE dbo.estate_groups
188
189EXECUTE sp_rename N'dbo.Tmp_estate_groups', N'estate_groups', 'OBJECT'
190
191CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
192 (
193 EstateID
194 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
195
196COMMIT
197
198
199:VERSION 6
200
201BEGIN TRANSACTION
202
203CREATE TABLE dbo.Tmp_estate_users
204 (
205 EstateID int NOT NULL,
206 uuid uniqueidentifier NOT NULL
207 ) ON [PRIMARY]
208
209IF EXISTS(SELECT * FROM dbo.estate_users)
210 EXEC('INSERT INTO dbo.Tmp_estate_users (EstateID, uuid)
211 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_users WITH (HOLDLOCK TABLOCKX)')
212
213DROP TABLE dbo.estate_users
214
215EXECUTE sp_rename N'dbo.Tmp_estate_users', N'estate_users', 'OBJECT'
216
217CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
218 (
219 EstateID
220 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
221
222COMMIT
223
224
225:VERSION 7
226
227BEGIN TRANSACTION
228
229CREATE TABLE dbo.Tmp_estateban
230 (
231 EstateID int NOT NULL,
232 bannedUUID uniqueidentifier NOT NULL,
233 bannedIp varchar(16) NULL,
234 bannedIpHostMask varchar(16) NULL,
235 bannedNameMask varchar(64) NULL
236 ) ON [PRIMARY]
237
238IF EXISTS(SELECT * FROM dbo.estateban)
239 EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
240 SELECT EstateID, CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban WITH (HOLDLOCK TABLOCKX)')
241
242DROP TABLE dbo.estateban
243
244EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
245
246CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
247 (
248 EstateID
249 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
250
251COMMIT
252
253
254:VERSION 8
255
256BEGIN TRANSACTION
257
258CREATE TABLE dbo.Tmp_estate_settings
259 (
260 EstateID int NOT NULL IDENTITY (1, 100),
261 EstateName varchar(64) NULL DEFAULT (NULL),
262 AbuseEmailToEstateOwner bit NOT NULL,
263 DenyAnonymous bit NOT NULL,
264 ResetHomeOnTeleport bit NOT NULL,
265 FixedSun bit NOT NULL,
266 DenyTransacted bit NOT NULL,
267 BlockDwell bit NOT NULL,
268 DenyIdentified bit NOT NULL,
269 AllowVoice bit NOT NULL,
270 UseGlobalTime bit NOT NULL,
271 PricePerMeter int NOT NULL,
272 TaxFree bit NOT NULL,
273 AllowDirectTeleport bit NOT NULL,
274 RedirectGridX int NOT NULL,
275 RedirectGridY int NOT NULL,
276 ParentEstateID int NOT NULL,
277 SunPosition float(53) NOT NULL,
278 EstateSkipScripts bit NOT NULL,
279 BillableFactor float(53) NOT NULL,
280 PublicAccess bit NOT NULL,
281 AbuseEmail varchar(255) NOT NULL,
282 EstateOwner uniqueidentifier NOT NULL,
283 DenyMinors bit NOT NULL
284 ) ON [PRIMARY]
285
286SET IDENTITY_INSERT dbo.Tmp_estate_settings ON
287
288IF EXISTS(SELECT * FROM dbo.estate_settings)
289 EXEC('INSERT INTO dbo.Tmp_estate_settings (EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, EstateOwner, DenyMinors)
290 SELECT EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, CONVERT(uniqueidentifier, EstateOwner), DenyMinors FROM dbo.estate_settings WITH (HOLDLOCK TABLOCKX)')
291
292SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF
293
294DROP TABLE dbo.estate_settings
295
296EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT'
297
298ALTER TABLE dbo.estate_settings ADD CONSTRAINT
299 PK_estate_settings PRIMARY KEY CLUSTERED
300 (
301 EstateID
302 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
303
304COMMIT
305
306
307:VERSION 9
308
309BEGIN TRANSACTION
310
311CREATE TABLE dbo.Tmp_estate_map
312 (
313 RegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
314 EstateID int NOT NULL
315 ) ON [PRIMARY]
316
317IF EXISTS(SELECT * FROM dbo.estate_map)
318 EXEC('INSERT INTO dbo.Tmp_estate_map (RegionID, EstateID)
319 SELECT CONVERT(uniqueidentifier, RegionID), EstateID FROM dbo.estate_map WITH (HOLDLOCK TABLOCKX)')
320
321DROP TABLE dbo.estate_map
322
323EXECUTE sp_rename N'dbo.Tmp_estate_map', N'estate_map', 'OBJECT'
324
325ALTER TABLE dbo.estate_map ADD CONSTRAINT
326 PK_estate_map PRIMARY KEY CLUSTERED
327 (
328 RegionID
329 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
330
331
332COMMIT
333
334
diff --git a/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations b/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations
deleted file mode 100644
index cc94c4e..0000000
--- a/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations
+++ /dev/null
@@ -1,50 +0,0 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [Friends] (
6[PrincipalID] uniqueidentifier NOT NULL,
7[Friend] varchar(255) NOT NULL,
8[Flags] char(16) NOT NULL DEFAULT '0',
9[Offered] varchar(32) NOT NULL DEFAULT 0)
10 ON [PRIMARY]
11
12COMMIT
13
14:VERSION 2
15
16BEGIN TRANSACTION
17
18IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[userfriends]') AND type in (N'U'))
19INSERT INTO Friends (PrincipalID, Friend, Flags, Offered)
20SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends;
21
22COMMIT
23
24:VERSION 3
25
26BEGIN TRANSACTION
27
28CREATE TABLE [Tmp_Friends]
29 ([PrincipalID] varchar(255) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
30[Friend] varchar(255) NOT NULL,
31[Flags] char(16) NOT NULL DEFAULT '0',
32[Offered] varchar(32) NOT NULL DEFAULT 0)
33ON [PRIMARY]
34
35
36IF EXISTS(SELECT * FROM dbo.Friends)
37 EXEC('INSERT INTO dbo.Tmp_Friends (PrincipalID, Friend, Flags, Offered)
38 SELECT CONVERT(varchar(255),PrincipalID), Friend, Flags, Offered FROM dbo.Friends WITH (HOLDLOCK TABLOCKX)')
39
40DROP TABLE dbo.Friends
41
42EXECUTE sp_rename N'dbo.Tmp_Friends', N'Friends', 'OBJECT'
43
44ALTER TABLE dbo.Friends ADD
45 PRIMARY KEY CLUSTERED
46(
47 [PrincipalID] ASC, [Friend] ASC
48)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
49
50COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/GridStore.migrations b/OpenSim/Data/MSSQL/Resources/GridStore.migrations
deleted file mode 100644
index de0cea7..0000000
--- a/OpenSim/Data/MSSQL/Resources/GridStore.migrations
+++ /dev/null
@@ -1,245 +0,0 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [dbo].[regions](
6 [regionHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
7 [regionName] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
8 [uuid] [varchar](255) COLLATE Latin1_General_CI_AS NOT NULL,
9 [regionRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
10 [regionSecret] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
11 [regionSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
12 [regionDataURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
13 [serverIP] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
14 [serverPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
15 [serverURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
16 [locX] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
17 [locY] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
18 [locZ] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
19 [eastOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
20 [westOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
21 [southOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
22 [northOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
23 [regionAssetURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
24 [regionAssetRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
25 [regionAssetSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
26 [regionUserURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
27 [regionUserRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
28 [regionUserSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
29 [regionMapTexture] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
30 [serverHttpPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
31 [serverRemotingPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
32 [owner_uuid] [varchar](36) COLLATE Latin1_General_CI_AS NULL,
33PRIMARY KEY CLUSTERED
34(
35 [uuid] ASC
36)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
37) ON [PRIMARY]
38
39COMMIT
40
41
42:VERSION 2
43
44BEGIN TRANSACTION
45
46CREATE TABLE Tmp_regions
47 (
48 uuid varchar(36) COLLATE Latin1_General_CI_AS NOT NULL,
49 regionHandle bigint NULL,
50 regionName varchar(20) NULL,
51 regionRecvKey varchar(128) NULL,
52 regionSendKey varchar(128) NULL,
53 regionSecret varchar(128) NULL,
54 regionDataURI varchar(128) NULL,
55 serverIP varchar(64) NULL,
56 serverPort int NULL,
57 serverURI varchar(255) NULL,
58 locX int NULL,
59 locY int NULL,
60 locZ int NULL,
61 eastOverrideHandle bigint NULL,
62 westOverrideHandle bigint NULL,
63 southOverrideHandle bigint NULL,
64 northOverrideHandle bigint NULL,
65 regionAssetURI varchar(255) NULL,
66 regionAssetRecvKey varchar(128) NULL,
67 regionAssetSendKey varchar(128) NULL,
68 regionUserURI varchar(255) NULL,
69 regionUserRecvKey varchar(128) NULL,
70 regionUserSendKey varchar(128) NULL,
71 regionMapTexture varchar(36) NULL,
72 serverHttpPort int NULL,
73 serverRemotingPort int NULL,
74 owner_uuid varchar(36) NULL,
75 originUUID varchar(36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000')
76 ) ON [PRIMARY]
77
78IF EXISTS(SELECT * FROM regions)
79 EXEC('INSERT INTO Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid)
80 SELECT CONVERT(varchar(36), uuid), CONVERT(bigint, regionHandle), CONVERT(varchar(20), regionName), CONVERT(varchar(128), regionRecvKey), CONVERT(varchar(128), regionSendKey), CONVERT(varchar(128), regionSecret), CONVERT(varchar(128), regionDataURI), CONVERT(varchar(64), serverIP), CONVERT(int, serverPort), serverURI, CONVERT(int, locX), CONVERT(int, locY), CONVERT(int, locZ), CONVERT(bigint, eastOverrideHandle), CONVERT(bigint, westOverrideHandle), CONVERT(bigint, southOverrideHandle), CONVERT(bigint, northOverrideHandle), regionAssetURI, CONVERT(varchar(128), regionAssetRecvKey), CONVERT(varchar(128), regionAssetSendKey), regionUserURI, CONVERT(varchar(128), regionUserRecvKey), CONVERT(varchar(128), regionUserSendKey), CONVERT(varchar(36), regionMapTexture), CONVERT(int, serverHttpPort), CONVERT(int, serverRemotingPort), owner_uuid FROM regions')
81
82DROP TABLE regions
83
84EXECUTE sp_rename N'Tmp_regions', N'regions', 'OBJECT'
85
86ALTER TABLE regions ADD CONSTRAINT
87 PK__regions__uuid PRIMARY KEY CLUSTERED
88 (
89 uuid
90 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
91
92COMMIT
93
94:VERSION 3
95
96BEGIN TRANSACTION
97
98CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
99 (
100 regionName
101 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
102
103CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions
104 (
105 regionHandle
106 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
107
108
109CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions
110 (
111 eastOverrideHandle,
112 westOverrideHandle,
113 southOverrideHandle,
114 northOverrideHandle
115 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
116
117COMMIT
118
119
120:VERSION 4
121
122/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
123BEGIN TRANSACTION
124
125CREATE TABLE dbo.Tmp_regions
126 (
127 uuid uniqueidentifier NOT NULL,
128 regionHandle bigint NULL,
129 regionName varchar(20) NULL,
130 regionRecvKey varchar(128) NULL,
131 regionSendKey varchar(128) NULL,
132 regionSecret varchar(128) NULL,
133 regionDataURI varchar(128) NULL,
134 serverIP varchar(64) NULL,
135 serverPort int NULL,
136 serverURI varchar(255) NULL,
137 locX int NULL,
138 locY int NULL,
139 locZ int NULL,
140 eastOverrideHandle bigint NULL,
141 westOverrideHandle bigint NULL,
142 southOverrideHandle bigint NULL,
143 northOverrideHandle bigint NULL,
144 regionAssetURI varchar(255) NULL,
145 regionAssetRecvKey varchar(128) NULL,
146 regionAssetSendKey varchar(128) NULL,
147 regionUserURI varchar(255) NULL,
148 regionUserRecvKey varchar(128) NULL,
149 regionUserSendKey varchar(128) NULL,
150 regionMapTexture uniqueidentifier NULL,
151 serverHttpPort int NULL,
152 serverRemotingPort int NULL,
153 owner_uuid uniqueidentifier NOT NULL,
154 originUUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000')
155 ) ON [PRIMARY]
156
157IF EXISTS(SELECT * FROM dbo.regions)
158 EXEC('INSERT INTO dbo.Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid, originUUID)
159 SELECT CONVERT(uniqueidentifier, uuid), regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, CONVERT(uniqueidentifier, regionMapTexture), serverHttpPort, serverRemotingPort, CONVERT(uniqueidentifier, owner_uuid), CONVERT(uniqueidentifier, originUUID) FROM dbo.regions WITH (HOLDLOCK TABLOCKX)')
160
161DROP TABLE dbo.regions
162
163EXECUTE sp_rename N'dbo.Tmp_regions', N'regions', 'OBJECT'
164
165ALTER TABLE dbo.regions ADD CONSTRAINT
166 PK__regions__uuid PRIMARY KEY CLUSTERED
167 (
168 uuid
169 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
170
171CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
172 (
173 regionName
174 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
175
176CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions
177 (
178 regionHandle
179 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
180
181CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions
182 (
183 eastOverrideHandle,
184 westOverrideHandle,
185 southOverrideHandle,
186 northOverrideHandle
187 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
188
189COMMIT
190
191
192:VERSION 5
193
194BEGIN TRANSACTION
195
196ALTER TABLE regions ADD access int default 0;
197
198COMMIT
199
200
201:VERSION 6
202
203BEGIN TRANSACTION
204
205ALTER TABLE regions ADD scopeid uniqueidentifier default '00000000-0000-0000-0000-000000000000';
206ALTER TABLE regions ADD DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [owner_uuid];
207ALTER TABLE regions ADD sizeX integer not null default 0;
208ALTER TABLE regions ADD sizeY integer not null default 0;
209
210COMMIT
211
212
213:VERSION 7
214
215BEGIN TRANSACTION
216
217ALTER TABLE regions ADD [flags] integer NOT NULL DEFAULT 0;
218CREATE INDEX [flags] ON regions(flags);
219ALTER TABLE [regions] ADD [last_seen] integer NOT NULL DEFAULT 0;
220ALTER TABLE [regions] ADD [PrincipalID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
221ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0;
222
223COMMIT
224
225:VERSION 8
226
227BEGIN TRANSACTION
228ALTER TABLE regions ALTER COLUMN regionName VarChar(128)
229
230DROP INDEX IX_regions_name ON dbo.regions
231ALTER TABLE regions ALTER COLUMN regionName VarChar(128) null
232
233CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
234 (
235 regionName
236 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
237
238COMMIT
239
240:VERSION 9
241
242BEGIN TRANSACTION
243ALTER TABLE regions ADD parcelMapTexture uniqueidentifier NULL;
244
245COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/GridUserStore.migrations b/OpenSim/Data/MSSQL/Resources/GridUserStore.migrations
deleted file mode 100644
index ecd3f4d..0000000
--- a/OpenSim/Data/MSSQL/Resources/GridUserStore.migrations
+++ /dev/null
@@ -1,65 +0,0 @@
1:VERSION 1 # --------------------------
2
3BEGIN TRANSACTION
4
5CREATE TABLE "GridUser" (
6 "UserID" VARCHAR(255) NOT NULL,
7 "HomeRegionID" CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
8 "HomePosition" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
9 "HomeLookAt" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
10 "LastRegionID" CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
11 "LastPosition" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
12 "LastLookAt" CHAR(64) NOT NULL DEFAULT '<0,0,0>',
13 "Online" CHAR(5) NOT NULL DEFAULT 'false',
14 "Login" CHAR(16) NOT NULL DEFAULT '0',
15 "Logout" CHAR(16) NOT NULL DEFAULT '0',
16 PRIMARY KEY ("UserID")
17)
18
19COMMIT
20
21:VERSION 2 # --------------------------
22
23BEGIN TRANSACTION
24
25CREATE TABLE [GridUser_tmp] (
26 [UserID] VARCHAR(255) NOT NULL,
27 [HomeRegionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
28 [HomePosition] CHAR(64) NOT NULL DEFAULT '<0,0,0>',
29 [HomeLookAt] CHAR(64) NOT NULL DEFAULT '<0,0,0>',
30 [LastRegionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
31 [LastPosition] CHAR(64) NOT NULL DEFAULT '<0,0,0>',
32 [LastLookAt] CHAR(64) NOT NULL DEFAULT '<0,0,0>',
33 [Online] CHAR(5) NOT NULL DEFAULT 'false',
34 [Login] CHAR(16) NOT NULL DEFAULT '0',
35 [Logout] CHAR(16) NOT NULL DEFAULT '0',
36
37 PRIMARY KEY CLUSTERED
38 (
39 [UserID] ASC
40 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
41 ) ON [PRIMARY]
42
43COMMIT
44
45IF EXISTS(SELECT * FROM dbo.GridUser)
46 EXEC('INSERT INTO dbo.GridUser_tmp ([UserID]
47 ,[HomeRegionID]
48 ,[HomePosition]
49 ,[HomeLookAt]
50 ,[LastRegionID]
51 ,[LastPosition]
52 ,[LastLookAt]
53 ,[Online]
54 ,[Login]
55 ,[Logout])
56 SELECT CONVERT(varchar(36), [HomeRegionID]), [HomePosition] ,[HomeLookAt] , CONVERT(varchar(36),[LastRegionID])
57 ,[LastPosition]
58 ,[LastLookAt]
59 ,[Online]
60 ,[Login]
61 ,[Logout] FROM dbo.GridUser WITH (HOLDLOCK TABLOCKX)')
62
63DROP TABLE dbo.GridUser
64
65EXECUTE sp_rename N'dbo.GridUser_tmp', N'GridUser', 'OBJECT' \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/InventoryStore.migrations b/OpenSim/Data/MSSQL/Resources/InventoryStore.migrations
deleted file mode 100644
index 4e43653..0000000
--- a/OpenSim/Data/MSSQL/Resources/InventoryStore.migrations
+++ /dev/null
@@ -1,279 +0,0 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [inventoryfolders] (
6 [folderID] [varchar](36) NOT NULL default '',
7 [agentID] [varchar](36) default NULL,
8 [parentFolderID] [varchar](36) default NULL,
9 [folderName] [varchar](64) default NULL,
10 [type] [smallint] NOT NULL default 0,
11 [version] [int] NOT NULL default 0,
12 PRIMARY KEY CLUSTERED
13(
14 [folderID] ASC
15)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
16) ON [PRIMARY]
17
18CREATE NONCLUSTERED INDEX [owner] ON [inventoryfolders]
19(
20 [agentID] ASC
21)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
22
23CREATE NONCLUSTERED INDEX [parent] ON [inventoryfolders]
24(
25 [parentFolderID] ASC
26)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
27
28
29CREATE TABLE [inventoryitems] (
30 [inventoryID] [varchar](36) NOT NULL default '',
31 [assetID] [varchar](36) default NULL,
32 [assetType] [int] default NULL,
33 [parentFolderID] [varchar](36) default NULL,
34 [avatarID] [varchar](36) default NULL,
35 [inventoryName] [varchar](64) default NULL,
36 [inventoryDescription] [varchar](128) default NULL,
37 [inventoryNextPermissions] [int] default NULL,
38 [inventoryCurrentPermissions] [int] default NULL,
39 [invType] [int] default NULL,
40 [creatorID] [varchar](36) default NULL,
41 [inventoryBasePermissions] [int] NOT NULL default 0,
42 [inventoryEveryOnePermissions] [int] NOT NULL default 0,
43 [salePrice] [int] default NULL,
44 [saleType] [tinyint] default NULL,
45 [creationDate] [int] default NULL,
46 [groupID] [varchar](36) default NULL,
47 [groupOwned] [bit] default NULL,
48 [flags] [int] default NULL,
49 PRIMARY KEY CLUSTERED
50(
51 [inventoryID] ASC
52)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
53) ON [PRIMARY]
54
55
56CREATE NONCLUSTERED INDEX [owner] ON [inventoryitems]
57(
58 [avatarID] ASC
59)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
60
61CREATE NONCLUSTERED INDEX [folder] ON [inventoryitems]
62(
63 [parentFolderID] ASC
64)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
65
66COMMIT
67
68
69:VERSION 2
70
71BEGIN TRANSACTION
72
73ALTER TABLE inventoryitems ADD inventoryGroupPermissions INTEGER NOT NULL default 0
74
75COMMIT
76
77:VERSION 3
78
79/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
80BEGIN TRANSACTION
81
82CREATE TABLE dbo.Tmp_inventoryfolders
83 (
84 folderID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
85 agentID uniqueidentifier NULL DEFAULT (NULL),
86 parentFolderID uniqueidentifier NULL DEFAULT (NULL),
87 folderName varchar(64) NULL DEFAULT (NULL),
88 type smallint NOT NULL DEFAULT ((0)),
89 version int NOT NULL DEFAULT ((0))
90 ) ON [PRIMARY]
91
92IF EXISTS(SELECT * FROM dbo.inventoryfolders)
93 EXEC('INSERT INTO dbo.Tmp_inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version)
94 SELECT CONVERT(uniqueidentifier, folderID), CONVERT(uniqueidentifier, agentID), CONVERT(uniqueidentifier, parentFolderID), folderName, type, version FROM dbo.inventoryfolders WITH (HOLDLOCK TABLOCKX)')
95
96DROP TABLE dbo.inventoryfolders
97
98EXECUTE sp_rename N'dbo.Tmp_inventoryfolders', N'inventoryfolders', 'OBJECT'
99
100ALTER TABLE dbo.inventoryfolders ADD CONSTRAINT
101 PK__inventor__C2FABFB3173876EA PRIMARY KEY CLUSTERED
102 (
103 folderID
104 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
105
106CREATE NONCLUSTERED INDEX owner ON dbo.inventoryfolders
107 (
108 agentID
109 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
110
111CREATE NONCLUSTERED INDEX parent ON dbo.inventoryfolders
112 (
113 parentFolderID
114 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
115
116COMMIT
117
118
119:VERSION 4
120
121BEGIN TRANSACTION
122
123CREATE TABLE dbo.Tmp_inventoryitems
124 (
125 inventoryID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
126 assetID uniqueidentifier NULL DEFAULT (NULL),
127 assetType int NULL DEFAULT (NULL),
128 parentFolderID uniqueidentifier NULL DEFAULT (NULL),
129 avatarID uniqueidentifier NULL DEFAULT (NULL),
130 inventoryName varchar(64) NULL DEFAULT (NULL),
131 inventoryDescription varchar(128) NULL DEFAULT (NULL),
132 inventoryNextPermissions int NULL DEFAULT (NULL),
133 inventoryCurrentPermissions int NULL DEFAULT (NULL),
134 invType int NULL DEFAULT (NULL),
135 creatorID uniqueidentifier NULL DEFAULT (NULL),
136 inventoryBasePermissions int NOT NULL DEFAULT ((0)),
137 inventoryEveryOnePermissions int NOT NULL DEFAULT ((0)),
138 salePrice int NULL DEFAULT (NULL),
139 saleType tinyint NULL DEFAULT (NULL),
140 creationDate int NULL DEFAULT (NULL),
141 groupID uniqueidentifier NULL DEFAULT (NULL),
142 groupOwned bit NULL DEFAULT (NULL),
143 flags int NULL DEFAULT (NULL),
144 inventoryGroupPermissions int NOT NULL DEFAULT ((0))
145 ) ON [PRIMARY]
146
147IF EXISTS(SELECT * FROM dbo.inventoryitems)
148 EXEC('INSERT INTO dbo.Tmp_inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryGroupPermissions)
149 SELECT CONVERT(uniqueidentifier, inventoryID), CONVERT(uniqueidentifier, assetID), assetType, CONVERT(uniqueidentifier, parentFolderID), CONVERT(uniqueidentifier, avatarID), inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, CONVERT(uniqueidentifier, creatorID), inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, CONVERT(uniqueidentifier, groupID), groupOwned, flags, inventoryGroupPermissions FROM dbo.inventoryitems WITH (HOLDLOCK TABLOCKX)')
150
151DROP TABLE dbo.inventoryitems
152
153EXECUTE sp_rename N'dbo.Tmp_inventoryitems', N'inventoryitems', 'OBJECT'
154
155ALTER TABLE dbo.inventoryitems ADD CONSTRAINT
156 PK__inventor__C4B7BC2220C1E124 PRIMARY KEY CLUSTERED
157 (
158 inventoryID
159 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
160
161
162CREATE NONCLUSTERED INDEX owner ON dbo.inventoryitems
163 (
164 avatarID
165 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
166
167CREATE NONCLUSTERED INDEX folder ON dbo.inventoryitems
168 (
169 parentFolderID
170 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
171
172COMMIT
173
174:VERSION 5
175
176# It would be totally crazy to have to recreate the whole table just to change one column type,
177# just because MS SQL treats each DEFAULT as a constraint object that must be dropped
178# before anything can be done to the column. Since all defaults here are unnamed, there is
179# no easy way to drop them! The hairy piece of code below removes all DEFAULT constraints
180# from InventoryItems.
181
182# SO: anything that's NULLable is by default NULL, so please don't declare DEFAULT(NULL),
183# they do nothing but prevent changes to the columns. If you really
184# need to have DEFAULTs or other constraints, give them names so they can be dropped when needed!
185
186BEGIN TRANSACTION
187DECLARE @nm varchar(80);
188DECLARE x CURSOR LOCAL FORWARD_ONLY READ_ONLY
189 FOR SELECT name FROM sys.default_constraints where parent_object_id = OBJECT_ID('inventoryitems');
190OPEN x;
191FETCH NEXT FROM x INTO @nm;
192WHILE @@FETCH_STATUS = 0
193BEGIN
194 EXEC('alter table inventoryitems drop ' + @nm);
195 FETCH NEXT FROM x INTO @nm;
196END
197CLOSE x
198DEALLOCATE x
199COMMIT
200
201# all DEFAULTs dropped!
202
203:GO
204
205BEGIN TRANSACTION
206
207# Restoring defaults:
208# NOTE: [inventoryID] does NOT need one: it's NOT NULL PK and a unique Guid must be provided every time anyway!
209
210alter table inventoryitems
211 add constraint def_baseperm default 0 for inventoryBasePermissions
212alter table inventoryitems
213 add constraint def_allperm default 0 for inventoryEveryOnePermissions
214alter table inventoryitems
215 add constraint def_grpperm default 0 for inventoryGroupPermissions
216
217COMMIT
218
219:VERSION 7
220
221BEGIN TRANSACTION
222
223# CreatorID goes back to VARCHAR(36) (???)
224
225exec sp_rename 'inventoryitems.CreatorID', 'cr_old', 'COLUMN'
226
227:GO
228
229alter table inventoryitems
230 add creatorID varchar(36) NULL
231
232:GO
233
234update inventoryitems set creatorID = CONVERT(VARCHAR(36), cr_old)
235
236alter table inventoryitems
237 drop column cr_old
238
239COMMIT
240
241:VERSION 8
242
243ALTER TABLE inventoryitems
244ADD CONSTRAINT DF_inventoryitems_creatorID
245DEFAULT '00000000-0000-0000-0000-000000000000' FOR creatorID
246
247:GO
248
249:VERSION 9
250
251BEGIN TRANSACTION
252
253# CreatorID goes up to VARCHAR(255)
254
255exec sp_rename 'inventoryitems.CreatorID', 'cr_old', 'COLUMN'
256
257:GO
258
259alter table inventoryitems
260 add creatorID varchar(255) NULL
261
262:GO
263
264update inventoryitems set creatorID = cr_old
265
266alter table inventoryitems
267drop CONSTRAINT DF_inventoryitems_creatorID
268:GO
269
270alter table inventoryitems
271 drop column cr_old
272 :GO
273COMMIT
274
275ALTER TABLE inventoryitems
276ADD CONSTRAINT DF_inventoryitems_creatorID
277DEFAULT '00000000-0000-0000-0000-000000000000' FOR creatorID
278
279:GO \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/LogStore.migrations b/OpenSim/Data/MSSQL/Resources/LogStore.migrations
deleted file mode 100644
index 1430d8d..0000000
--- a/OpenSim/Data/MSSQL/Resources/LogStore.migrations
+++ /dev/null
@@ -1,19 +0,0 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [logs] (
6 [logID] [int] NOT NULL,
7 [target] [varchar](36) default NULL,
8 [server] [varchar](64) default NULL,
9 [method] [varchar](64) default NULL,
10 [arguments] [varchar](255) default NULL,
11 [priority] [int] default NULL,
12 [message] [ntext],
13 PRIMARY KEY CLUSTERED
14(
15 [logID] ASC
16)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
17) ON [PRIMARY]
18
19COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/Presence.migrations b/OpenSim/Data/MSSQL/Resources/Presence.migrations
deleted file mode 100644
index bcb6328..0000000
--- a/OpenSim/Data/MSSQL/Resources/Presence.migrations
+++ /dev/null
@@ -1,31 +0,0 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [Presence] (
6[UserID] varchar(255) NOT NULL,
7[RegionID] uniqueidentifier NOT NULL,
8[SessionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
9[SecureSessionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
10
11)
12 ON [PRIMARY]
13
14COMMIT
15
16:VERSION 2
17
18BEGIN TRANSACTION
19
20CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
21CREATE INDEX UserID ON Presence(UserID);
22
23COMMIT
24
25:VERSION 2
26
27BEGIN TRANSACTION
28
29ALTER TABLE Presence ADD LastSeen DateTime
30
31COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
deleted file mode 100644
index 350e548..0000000
--- a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
+++ /dev/null
@@ -1,1150 +0,0 @@
1:VERSION 1
2
3CREATE TABLE [dbo].[prims](
4 [UUID] [varchar](255) NOT NULL,
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] [float] NULL,
25 [PositionY] [float] NULL,
26 [PositionZ] [float] NULL,
27 [GroupPositionX] [float] NULL,
28 [GroupPositionY] [float] NULL,
29 [GroupPositionZ] [float] NULL,
30 [VelocityX] [float] NULL,
31 [VelocityY] [float] NULL,
32 [VelocityZ] [float] NULL,
33 [AngularVelocityX] [float] NULL,
34 [AngularVelocityY] [float] NULL,
35 [AngularVelocityZ] [float] NULL,
36 [AccelerationX] [float] NULL,
37 [AccelerationY] [float] NULL,
38 [AccelerationZ] [float] NULL,
39 [RotationX] [float] NULL,
40 [RotationY] [float] NULL,
41 [RotationZ] [float] NULL,
42 [RotationW] [float] NULL,
43 [SitTargetOffsetX] [float] NULL,
44 [SitTargetOffsetY] [float] NULL,
45 [SitTargetOffsetZ] [float] NULL,
46 [SitTargetOrientW] [float] NULL,
47 [SitTargetOrientX] [float] NULL,
48 [SitTargetOrientY] [float] NULL,
49 [SitTargetOrientZ] [float] NULL,
50PRIMARY KEY CLUSTERED
51(
52 [UUID] ASC
53)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
54) ON [PRIMARY]
55
56CREATE TABLE [dbo].[primshapes](
57 [UUID] [varchar](255) NOT NULL,
58 [Shape] [int] NULL,
59 [ScaleX] [float] NULL,
60 [ScaleY] [float] NULL,
61 [ScaleZ] [float] NULL,
62 [PCode] [int] NULL,
63 [PathBegin] [int] NULL,
64 [PathEnd] [int] NULL,
65 [PathScaleX] [int] NULL,
66 [PathScaleY] [int] NULL,
67 [PathShearX] [int] NULL,
68 [PathShearY] [int] NULL,
69 [PathSkew] [int] NULL,
70 [PathCurve] [int] NULL,
71 [PathRadiusOffset] [int] NULL,
72 [PathRevolutions] [int] NULL,
73 [PathTaperX] [int] NULL,
74 [PathTaperY] [int] NULL,
75 [PathTwist] [int] NULL,
76 [PathTwistBegin] [int] NULL,
77 [ProfileBegin] [int] NULL,
78 [ProfileEnd] [int] NULL,
79 [ProfileCurve] [int] NULL,
80 [ProfileHollow] [int] NULL,
81 [State] [int] NULL,
82 [Texture] [image] NULL,
83 [ExtraParams] [image] NULL,
84PRIMARY KEY CLUSTERED
85(
86 [UUID] ASC
87)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
88) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
89
90CREATE TABLE [dbo].[primitems](
91 [itemID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
92 [primID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
93 [assetID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
94 [parentFolderID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
95 [invType] [int] NULL,
96 [assetType] [int] NULL,
97 [name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
98 [description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
99 [creationDate] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
100 [creatorID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
101 [ownerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
102 [lastOwnerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
103 [groupID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
104 [nextPermissions] [int] NULL,
105 [currentPermissions] [int] NULL,
106 [basePermissions] [int] NULL,
107 [everyonePermissions] [int] NULL,
108 [groupPermissions] [int] NULL,
109PRIMARY KEY CLUSTERED
110(
111 [itemID] ASC
112)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
113) ON [PRIMARY]
114
115CREATE TABLE [dbo].[terrain](
116 [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
117 [Revision] [int] NULL,
118 [Heightfield] [image] NULL
119) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
120
121CREATE TABLE [dbo].[land](
122 [UUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
123 [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
124 [LocalLandID] [int] NULL,
125 [Bitmap] [image] NULL,
126 [Name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
127 [Description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
128 [OwnerUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
129 [IsGroupOwned] [int] NULL,
130 [Area] [int] NULL,
131 [AuctionID] [int] NULL,
132 [Category] [int] NULL,
133 [ClaimDate] [int] NULL,
134 [ClaimPrice] [int] NULL,
135 [GroupUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
136 [SalePrice] [int] NULL,
137 [LandStatus] [int] NULL,
138 [LandFlags] [int] NULL,
139 [LandingType] [int] NULL,
140 [MediaAutoScale] [int] NULL,
141 [MediaTextureUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
142 [MediaURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
143 [MusicURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
144 [PassHours] [float] NULL,
145 [PassPrice] [int] NULL,
146 [SnapshotUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
147 [UserLocationX] [float] NULL,
148 [UserLocationY] [float] NULL,
149 [UserLocationZ] [float] NULL,
150 [UserLookAtX] [float] NULL,
151 [UserLookAtY] [float] NULL,
152 [UserLookAtZ] [float] NULL,
153PRIMARY KEY CLUSTERED
154(
155 [UUID] ASC
156)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
157) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
158
159CREATE TABLE [dbo].[landaccesslist](
160 [LandUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
161 [AccessUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
162 [Flags] [int] NULL
163) ON [PRIMARY]
164
165:VERSION 2
166
167BEGIN TRANSACTION
168
169CREATE TABLE regionban (
170 [regionUUID] VARCHAR(36) NOT NULL,
171 [bannedUUID] VARCHAR(36) NOT NULL,
172 [bannedIp] VARCHAR(16) NOT NULL,
173 [bannedIpHostMask] VARCHAR(16) NOT NULL)
174
175create table [dbo].[regionsettings] (
176 [regionUUID] [varchar](36) not null,
177 [block_terraform] [bit] not null,
178 [block_fly] [bit] not null,
179 [allow_damage] [bit] not null,
180 [restrict_pushing] [bit] not null,
181 [allow_land_resell] [bit] not null,
182 [allow_land_join_divide] [bit] not null,
183 [block_show_in_search] [bit] not null,
184 [agent_limit] [int] not null,
185 [object_bonus] [float] not null,
186 [maturity] [int] not null,
187 [disable_scripts] [bit] not null,
188 [disable_collisions] [bit] not null,
189 [disable_physics] [bit] not null,
190 [terrain_texture_1] [varchar](36) not null,
191 [terrain_texture_2] [varchar](36) not null,
192 [terrain_texture_3] [varchar](36) not null,
193 [terrain_texture_4] [varchar](36) not null,
194 [elevation_1_nw] [float] not null,
195 [elevation_2_nw] [float] not null,
196 [elevation_1_ne] [float] not null,
197 [elevation_2_ne] [float] not null,
198 [elevation_1_se] [float] not null,
199 [elevation_2_se] [float] not null,
200 [elevation_1_sw] [float] not null,
201 [elevation_2_sw] [float] not null,
202 [water_height] [float] not null,
203 [terrain_raise_limit] [float] not null,
204 [terrain_lower_limit] [float] not null,
205 [use_estate_sun] [bit] not null,
206 [fixed_sun] [bit] not null,
207 [sun_position] [float] not null,
208 [covenant] [varchar](36) default NULL,
209 [Sandbox] [bit] NOT NULL,
210PRIMARY KEY CLUSTERED
211(
212 [regionUUID] ASC
213)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
214) ON [PRIMARY]
215
216COMMIT
217
218:VERSION 3
219
220BEGIN TRANSACTION
221
222CREATE TABLE dbo.Tmp_prims
223 (
224 UUID varchar(36) NOT NULL,
225 RegionUUID varchar(36) NULL,
226 ParentID int NULL,
227 CreationDate int NULL,
228 Name varchar(255) NULL,
229 SceneGroupID varchar(36) NULL,
230 Text varchar(255) NULL,
231 Description varchar(255) NULL,
232 SitName varchar(255) NULL,
233 TouchName varchar(255) NULL,
234 ObjectFlags int NULL,
235 CreatorID varchar(36) NULL,
236 OwnerID varchar(36) NULL,
237 GroupID varchar(36) NULL,
238 LastOwnerID varchar(36) NULL,
239 OwnerMask int NULL,
240 NextOwnerMask int NULL,
241 GroupMask int NULL,
242 EveryoneMask int NULL,
243 BaseMask int NULL,
244 PositionX float(53) NULL,
245 PositionY float(53) NULL,
246 PositionZ float(53) NULL,
247 GroupPositionX float(53) NULL,
248 GroupPositionY float(53) NULL,
249 GroupPositionZ float(53) NULL,
250 VelocityX float(53) NULL,
251 VelocityY float(53) NULL,
252 VelocityZ float(53) NULL,
253 AngularVelocityX float(53) NULL,
254 AngularVelocityY float(53) NULL,
255 AngularVelocityZ float(53) NULL,
256 AccelerationX float(53) NULL,
257 AccelerationY float(53) NULL,
258 AccelerationZ float(53) NULL,
259 RotationX float(53) NULL,
260 RotationY float(53) NULL,
261 RotationZ float(53) NULL,
262 RotationW float(53) NULL,
263 SitTargetOffsetX float(53) NULL,
264 SitTargetOffsetY float(53) NULL,
265 SitTargetOffsetZ float(53) NULL,
266 SitTargetOrientW float(53) NULL,
267 SitTargetOrientX float(53) NULL,
268 SitTargetOrientY float(53) NULL,
269 SitTargetOrientZ float(53) NULL
270 ) ON [PRIMARY]
271
272IF EXISTS(SELECT * FROM dbo.prims)
273 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)
274 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)')
275
276DROP TABLE dbo.prims
277
278EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT'
279
280ALTER TABLE dbo.prims ADD CONSTRAINT
281 PK__prims__10566F31 PRIMARY KEY CLUSTERED
282 (
283 UUID
284 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
285
286COMMIT
287
288:VERSION 4
289
290BEGIN TRANSACTION
291
292CREATE TABLE Tmp_primitems
293 (
294 itemID varchar(36) NOT NULL,
295 primID varchar(36) NULL,
296 assetID varchar(36) NULL,
297 parentFolderID varchar(36) NULL,
298 invType int NULL,
299 assetType int NULL,
300 name varchar(255) NULL,
301 description varchar(255) NULL,
302 creationDate varchar(255) NULL,
303 creatorID varchar(36) NULL,
304 ownerID varchar(36) NULL,
305 lastOwnerID varchar(36) NULL,
306 groupID varchar(36) NULL,
307 nextPermissions int NULL,
308 currentPermissions int NULL,
309 basePermissions int NULL,
310 everyonePermissions int NULL,
311 groupPermissions int NULL
312 ) ON [PRIMARY]
313
314IF EXISTS(SELECT * FROM primitems)
315 EXEC('INSERT INTO Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions)
316 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')
317
318DROP TABLE primitems
319
320EXECUTE sp_rename N'Tmp_primitems', N'primitems', 'OBJECT'
321
322ALTER TABLE primitems ADD CONSTRAINT
323 PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED
324 (
325 itemID
326 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
327
328
329COMMIT
330
331
332:VERSION 5
333
334BEGIN TRANSACTION
335
336CREATE TABLE Tmp_primshapes
337 (
338 UUID varchar(36) NOT NULL,
339 Shape int NULL,
340 ScaleX float(53) NULL,
341 ScaleY float(53) NULL,
342 ScaleZ float(53) NULL,
343 PCode int NULL,
344 PathBegin int NULL,
345 PathEnd int NULL,
346 PathScaleX int NULL,
347 PathScaleY int NULL,
348 PathShearX int NULL,
349 PathShearY int NULL,
350 PathSkew int NULL,
351 PathCurve int NULL,
352 PathRadiusOffset int NULL,
353 PathRevolutions int NULL,
354 PathTaperX int NULL,
355 PathTaperY int NULL,
356 PathTwist int NULL,
357 PathTwistBegin int NULL,
358 ProfileBegin int NULL,
359 ProfileEnd int NULL,
360 ProfileCurve int NULL,
361 ProfileHollow int NULL,
362 State int NULL,
363 Texture image NULL,
364 ExtraParams image NULL
365 ) ON [PRIMARY]
366 TEXTIMAGE_ON [PRIMARY]
367
368IF EXISTS(SELECT * FROM primshapes)
369 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)
370 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)')
371
372DROP TABLE primshapes
373
374EXECUTE sp_rename N'Tmp_primshapes', N'primshapes', 'OBJECT'
375
376ALTER TABLE primshapes ADD CONSTRAINT
377 PK__primshapes__0880433F PRIMARY KEY CLUSTERED
378 (
379 UUID
380 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
381
382COMMIT
383
384
385:VERSION 6
386
387BEGIN TRANSACTION
388
389ALTER TABLE prims ADD PayPrice int not null default 0
390ALTER TABLE prims ADD PayButton1 int not null default 0
391ALTER TABLE prims ADD PayButton2 int not null default 0
392ALTER TABLE prims ADD PayButton3 int not null default 0
393ALTER TABLE prims ADD PayButton4 int not null default 0
394ALTER TABLE prims ADD LoopedSound varchar(36) not null default '00000000-0000-0000-0000-000000000000';
395ALTER TABLE prims ADD LoopedSoundGain float not null default 0.0;
396ALTER TABLE prims ADD TextureAnimation image
397ALTER TABLE prims ADD OmegaX float not null default 0.0
398ALTER TABLE prims ADD OmegaY float not null default 0.0
399ALTER TABLE prims ADD OmegaZ float not null default 0.0
400ALTER TABLE prims ADD CameraEyeOffsetX float not null default 0.0
401ALTER TABLE prims ADD CameraEyeOffsetY float not null default 0.0
402ALTER TABLE prims ADD CameraEyeOffsetZ float not null default 0.0
403ALTER TABLE prims ADD CameraAtOffsetX float not null default 0.0
404ALTER TABLE prims ADD CameraAtOffsetY float not null default 0.0
405ALTER TABLE prims ADD CameraAtOffsetZ float not null default 0.0
406ALTER TABLE prims ADD ForceMouselook tinyint not null default 0
407ALTER TABLE prims ADD ScriptAccessPin int not null default 0
408ALTER TABLE prims ADD AllowedDrop tinyint not null default 0
409ALTER TABLE prims ADD DieAtEdge tinyint not null default 0
410ALTER TABLE prims ADD SalePrice int not null default 10
411ALTER TABLE prims ADD SaleType tinyint not null default 0
412
413ALTER TABLE primitems add flags integer not null default 0
414
415ALTER TABLE land ADD AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'
416
417CREATE index prims_regionuuid on prims(RegionUUID)
418CREATE index prims_parentid on prims(ParentID)
419
420CREATE index primitems_primid on primitems(primID)
421
422COMMIT
423
424
425:VERSION 7
426
427BEGIN TRANSACTION
428
429ALTER TABLE prims ADD ColorR int not null default 0;
430ALTER TABLE prims ADD ColorG int not null default 0;
431ALTER TABLE prims ADD ColorB int not null default 0;
432ALTER TABLE prims ADD ColorA int not null default 0;
433ALTER TABLE prims ADD ParticleSystem IMAGE;
434ALTER TABLE prims ADD ClickAction tinyint NOT NULL default 0;
435
436COMMIT
437
438
439:VERSION 8
440
441BEGIN TRANSACTION
442
443ALTER TABLE land ADD OtherCleanTime integer NOT NULL default 0;
444ALTER TABLE land ADD Dwell integer NOT NULL default 0;
445
446COMMIT
447
448:VERSION 9
449
450BEGIN TRANSACTION
451
452ALTER TABLE prims ADD Material tinyint NOT NULL default 3
453
454COMMIT
455
456
457:VERSION 10
458
459BEGIN TRANSACTION
460
461ALTER TABLE regionsettings ADD sunvectorx float NOT NULL default 0;
462ALTER TABLE regionsettings ADD sunvectory float NOT NULL default 0;
463ALTER TABLE regionsettings ADD sunvectorz float NOT NULL default 0;
464
465COMMIT
466
467
468:VERSION 11
469
470BEGIN TRANSACTION
471
472ALTER TABLE prims ADD CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000'
473ALTER TABLE prims ADD CollisionSoundVolume float not null default 0.0
474
475COMMIT
476
477
478:VERSION 12
479
480BEGIN TRANSACTION
481
482ALTER TABLE prims ADD LinkNumber integer not null default 0
483
484COMMIT
485
486
487:VERSION 13
488
489BEGIN TRANSACTION
490
491CREATE TABLE dbo.Tmp_prims
492 (
493 UUID uniqueidentifier NOT NULL,
494 RegionUUID uniqueidentifier NULL,
495 ParentID int NULL,
496 CreationDate int NULL,
497 Name varchar(255) NULL,
498 SceneGroupID uniqueidentifier NULL,
499 Text varchar(255) NULL,
500 Description varchar(255) NULL,
501 SitName varchar(255) NULL,
502 TouchName varchar(255) NULL,
503 ObjectFlags int NULL,
504 CreatorID uniqueidentifier NULL,
505 OwnerID uniqueidentifier NULL,
506 GroupID uniqueidentifier NULL,
507 LastOwnerID uniqueidentifier NULL,
508 OwnerMask int NULL,
509 NextOwnerMask int NULL,
510 GroupMask int NULL,
511 EveryoneMask int NULL,
512 BaseMask int NULL,
513 PositionX float(53) NULL,
514 PositionY float(53) NULL,
515 PositionZ float(53) NULL,
516 GroupPositionX float(53) NULL,
517 GroupPositionY float(53) NULL,
518 GroupPositionZ float(53) NULL,
519 VelocityX float(53) NULL,
520 VelocityY float(53) NULL,
521 VelocityZ float(53) NULL,
522 AngularVelocityX float(53) NULL,
523 AngularVelocityY float(53) NULL,
524 AngularVelocityZ float(53) NULL,
525 AccelerationX float(53) NULL,
526 AccelerationY float(53) NULL,
527 AccelerationZ float(53) NULL,
528 RotationX float(53) NULL,
529 RotationY float(53) NULL,
530 RotationZ float(53) NULL,
531 RotationW float(53) NULL,
532 SitTargetOffsetX float(53) NULL,
533 SitTargetOffsetY float(53) NULL,
534 SitTargetOffsetZ float(53) NULL,
535 SitTargetOrientW float(53) NULL,
536 SitTargetOrientX float(53) NULL,
537 SitTargetOrientY float(53) NULL,
538 SitTargetOrientZ float(53) NULL,
539 PayPrice int NOT NULL DEFAULT ((0)),
540 PayButton1 int NOT NULL DEFAULT ((0)),
541 PayButton2 int NOT NULL DEFAULT ((0)),
542 PayButton3 int NOT NULL DEFAULT ((0)),
543 PayButton4 int NOT NULL DEFAULT ((0)),
544 LoopedSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
545 LoopedSoundGain float(53) NOT NULL DEFAULT ((0.0)),
546 TextureAnimation image NULL,
547 OmegaX float(53) NOT NULL DEFAULT ((0.0)),
548 OmegaY float(53) NOT NULL DEFAULT ((0.0)),
549 OmegaZ float(53) NOT NULL DEFAULT ((0.0)),
550 CameraEyeOffsetX float(53) NOT NULL DEFAULT ((0.0)),
551 CameraEyeOffsetY float(53) NOT NULL DEFAULT ((0.0)),
552 CameraEyeOffsetZ float(53) NOT NULL DEFAULT ((0.0)),
553 CameraAtOffsetX float(53) NOT NULL DEFAULT ((0.0)),
554 CameraAtOffsetY float(53) NOT NULL DEFAULT ((0.0)),
555 CameraAtOffsetZ float(53) NOT NULL DEFAULT ((0.0)),
556 ForceMouselook tinyint NOT NULL DEFAULT ((0)),
557 ScriptAccessPin int NOT NULL DEFAULT ((0)),
558 AllowedDrop tinyint NOT NULL DEFAULT ((0)),
559 DieAtEdge tinyint NOT NULL DEFAULT ((0)),
560 SalePrice int NOT NULL DEFAULT ((10)),
561 SaleType tinyint NOT NULL DEFAULT ((0)),
562 ColorR int NOT NULL DEFAULT ((0)),
563 ColorG int NOT NULL DEFAULT ((0)),
564 ColorB int NOT NULL DEFAULT ((0)),
565 ColorA int NOT NULL DEFAULT ((0)),
566 ParticleSystem image NULL,
567 ClickAction tinyint NOT NULL DEFAULT ((0)),
568 Material tinyint NOT NULL DEFAULT ((3)),
569 CollisionSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
570 CollisionSoundVolume float(53) NOT NULL DEFAULT ((0.0)),
571 LinkNumber int NOT NULL DEFAULT ((0))
572 ) ON [PRIMARY]
573 TEXTIMAGE_ON [PRIMARY]
574
575IF EXISTS(SELECT * FROM dbo.prims)
576 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)
577 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)')
578
579DROP TABLE dbo.prims
580
581EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT'
582
583ALTER TABLE dbo.prims ADD CONSTRAINT
584 PK__prims__10566F31 PRIMARY KEY CLUSTERED
585 (
586 UUID
587 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
588
589
590CREATE NONCLUSTERED INDEX prims_regionuuid ON dbo.prims
591 (
592 RegionUUID
593 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
594
595CREATE NONCLUSTERED INDEX prims_parentid ON dbo.prims
596 (
597 ParentID
598 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
599
600COMMIT
601
602
603:VERSION 14
604
605BEGIN TRANSACTION
606
607CREATE TABLE dbo.Tmp_primshapes
608 (
609 UUID uniqueidentifier NOT NULL,
610 Shape int NULL,
611 ScaleX float(53) NULL,
612 ScaleY float(53) NULL,
613 ScaleZ float(53) NULL,
614 PCode int NULL,
615 PathBegin int NULL,
616 PathEnd int NULL,
617 PathScaleX int NULL,
618 PathScaleY int NULL,
619 PathShearX int NULL,
620 PathShearY int NULL,
621 PathSkew int NULL,
622 PathCurve int NULL,
623 PathRadiusOffset int NULL,
624 PathRevolutions int NULL,
625 PathTaperX int NULL,
626 PathTaperY int NULL,
627 PathTwist int NULL,
628 PathTwistBegin int NULL,
629 ProfileBegin int NULL,
630 ProfileEnd int NULL,
631 ProfileCurve int NULL,
632 ProfileHollow int NULL,
633 State int NULL,
634 Texture image NULL,
635 ExtraParams image NULL
636 ) ON [PRIMARY]
637 TEXTIMAGE_ON [PRIMARY]
638
639IF EXISTS(SELECT * FROM dbo.primshapes)
640 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)
641 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)')
642
643DROP TABLE dbo.primshapes
644
645EXECUTE sp_rename N'dbo.Tmp_primshapes', N'primshapes', 'OBJECT'
646
647ALTER TABLE dbo.primshapes ADD CONSTRAINT
648 PK__primshapes__0880433F PRIMARY KEY CLUSTERED
649 (
650 UUID
651 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
652
653COMMIT
654
655
656:VERSION 15
657
658BEGIN TRANSACTION
659
660CREATE TABLE dbo.Tmp_primitems
661 (
662 itemID uniqueidentifier NOT NULL,
663 primID uniqueidentifier NULL,
664 assetID uniqueidentifier NULL,
665 parentFolderID uniqueidentifier NULL,
666 invType int NULL,
667 assetType int NULL,
668 name varchar(255) NULL,
669 description varchar(255) NULL,
670 creationDate varchar(255) NULL,
671 creatorID uniqueidentifier NULL,
672 ownerID uniqueidentifier NULL,
673 lastOwnerID uniqueidentifier NULL,
674 groupID uniqueidentifier NULL,
675 nextPermissions int NULL,
676 currentPermissions int NULL,
677 basePermissions int NULL,
678 everyonePermissions int NULL,
679 groupPermissions int NULL,
680 flags int NOT NULL DEFAULT ((0))
681 ) ON [PRIMARY]
682
683IF EXISTS(SELECT * FROM dbo.primitems)
684 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)
685 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)')
686
687DROP TABLE dbo.primitems
688
689EXECUTE sp_rename N'dbo.Tmp_primitems', N'primitems', 'OBJECT'
690
691ALTER TABLE dbo.primitems ADD CONSTRAINT
692 PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED
693 (
694 itemID
695 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
696
697CREATE NONCLUSTERED INDEX primitems_primid ON dbo.primitems
698 (
699 primID
700 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
701
702COMMIT
703
704
705:VERSION 16
706
707
708BEGIN TRANSACTION
709
710CREATE TABLE dbo.Tmp_terrain
711 (
712 RegionUUID uniqueidentifier NULL,
713 Revision int NULL,
714 Heightfield image NULL
715 ) ON [PRIMARY]
716 TEXTIMAGE_ON [PRIMARY]
717
718IF EXISTS(SELECT * FROM dbo.terrain)
719 EXEC('INSERT INTO dbo.Tmp_terrain (RegionUUID, Revision, Heightfield)
720 SELECT CONVERT(uniqueidentifier, RegionUUID), Revision, Heightfield FROM dbo.terrain WITH (HOLDLOCK TABLOCKX)')
721
722DROP TABLE dbo.terrain
723
724EXECUTE sp_rename N'dbo.Tmp_terrain', N'terrain', 'OBJECT'
725
726COMMIT
727
728
729:VERSION 17
730
731BEGIN TRANSACTION
732
733CREATE TABLE dbo.Tmp_land
734 (
735 UUID uniqueidentifier NOT NULL,
736 RegionUUID uniqueidentifier NULL,
737 LocalLandID int NULL,
738 Bitmap image NULL,
739 Name varchar(255) NULL,
740 Description varchar(255) NULL,
741 OwnerUUID uniqueidentifier NULL,
742 IsGroupOwned int NULL,
743 Area int NULL,
744 AuctionID int NULL,
745 Category int NULL,
746 ClaimDate int NULL,
747 ClaimPrice int NULL,
748 GroupUUID uniqueidentifier NULL,
749 SalePrice int NULL,
750 LandStatus int NULL,
751 LandFlags int NULL,
752 LandingType int NULL,
753 MediaAutoScale int NULL,
754 MediaTextureUUID uniqueidentifier NULL,
755 MediaURL varchar(255) NULL,
756 MusicURL varchar(255) NULL,
757 PassHours float(53) NULL,
758 PassPrice int NULL,
759 SnapshotUUID uniqueidentifier NULL,
760 UserLocationX float(53) NULL,
761 UserLocationY float(53) NULL,
762 UserLocationZ float(53) NULL,
763 UserLookAtX float(53) NULL,
764 UserLookAtY float(53) NULL,
765 UserLookAtZ float(53) NULL,
766 AuthbuyerID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
767 OtherCleanTime int NOT NULL DEFAULT ((0)),
768 Dwell int NOT NULL DEFAULT ((0))
769 ) ON [PRIMARY]
770 TEXTIMAGE_ON [PRIMARY]
771
772IF EXISTS(SELECT * FROM dbo.land)
773 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)
774 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)')
775
776DROP TABLE dbo.land
777
778EXECUTE sp_rename N'dbo.Tmp_land', N'land', 'OBJECT'
779
780ALTER TABLE dbo.land ADD CONSTRAINT
781 PK__land__65A475E71BFD2C07 PRIMARY KEY CLUSTERED
782 (
783 UUID
784 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
785
786COMMIT
787
788
789
790:VERSION 18
791
792BEGIN TRANSACTION
793
794CREATE TABLE dbo.Tmp_landaccesslist
795 (
796 LandUUID uniqueidentifier NULL,
797 AccessUUID uniqueidentifier NULL,
798 Flags int NULL
799 ) ON [PRIMARY]
800
801IF EXISTS(SELECT * FROM dbo.landaccesslist)
802 EXEC('INSERT INTO dbo.Tmp_landaccesslist (LandUUID, AccessUUID, Flags)
803 SELECT CONVERT(uniqueidentifier, LandUUID), CONVERT(uniqueidentifier, AccessUUID), Flags FROM dbo.landaccesslist WITH (HOLDLOCK TABLOCKX)')
804
805DROP TABLE dbo.landaccesslist
806
807EXECUTE sp_rename N'dbo.Tmp_landaccesslist', N'landaccesslist', 'OBJECT'
808
809COMMIT
810
811
812
813:VERSION 19
814
815BEGIN TRANSACTION
816
817CREATE TABLE dbo.Tmp_regionban
818 (
819 regionUUID uniqueidentifier NOT NULL,
820 bannedUUID uniqueidentifier NOT NULL,
821 bannedIp varchar(16) NOT NULL,
822 bannedIpHostMask varchar(16) NOT NULL
823 ) ON [PRIMARY]
824
825IF EXISTS(SELECT * FROM dbo.regionban)
826 EXEC('INSERT INTO dbo.Tmp_regionban (regionUUID, bannedUUID, bannedIp, bannedIpHostMask)
827 SELECT CONVERT(uniqueidentifier, regionUUID), CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask FROM dbo.regionban WITH (HOLDLOCK TABLOCKX)')
828
829DROP TABLE dbo.regionban
830
831EXECUTE sp_rename N'dbo.Tmp_regionban', N'regionban', 'OBJECT'
832
833COMMIT
834
835
836:VERSION 20
837
838BEGIN TRANSACTION
839
840CREATE TABLE dbo.Tmp_regionsettings
841 (
842 regionUUID uniqueidentifier NOT NULL,
843 block_terraform bit NOT NULL,
844 block_fly bit NOT NULL,
845 allow_damage bit NOT NULL,
846 restrict_pushing bit NOT NULL,
847 allow_land_resell bit NOT NULL,
848 allow_land_join_divide bit NOT NULL,
849 block_show_in_search bit NOT NULL,
850 agent_limit int NOT NULL,
851 object_bonus float(53) NOT NULL,
852 maturity int NOT NULL,
853 disable_scripts bit NOT NULL,
854 disable_collisions bit NOT NULL,
855 disable_physics bit NOT NULL,
856 terrain_texture_1 uniqueidentifier NOT NULL,
857 terrain_texture_2 uniqueidentifier NOT NULL,
858 terrain_texture_3 uniqueidentifier NOT NULL,
859 terrain_texture_4 uniqueidentifier NOT NULL,
860 elevation_1_nw float(53) NOT NULL,
861 elevation_2_nw float(53) NOT NULL,
862 elevation_1_ne float(53) NOT NULL,
863 elevation_2_ne float(53) NOT NULL,
864 elevation_1_se float(53) NOT NULL,
865 elevation_2_se float(53) NOT NULL,
866 elevation_1_sw float(53) NOT NULL,
867 elevation_2_sw float(53) NOT NULL,
868 water_height float(53) NOT NULL,
869 terrain_raise_limit float(53) NOT NULL,
870 terrain_lower_limit float(53) NOT NULL,
871 use_estate_sun bit NOT NULL,
872 fixed_sun bit NOT NULL,
873 sun_position float(53) NOT NULL,
874 covenant uniqueidentifier NULL DEFAULT (NULL),
875 Sandbox bit NOT NULL,
876 sunvectorx float(53) NOT NULL DEFAULT ((0)),
877 sunvectory float(53) NOT NULL DEFAULT ((0)),
878 sunvectorz float(53) NOT NULL DEFAULT ((0))
879 ) ON [PRIMARY]
880
881IF EXISTS(SELECT * FROM dbo.regionsettings)
882 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)
883 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)')
884
885DROP TABLE dbo.regionsettings
886
887EXECUTE sp_rename N'dbo.Tmp_regionsettings', N'regionsettings', 'OBJECT'
888
889ALTER TABLE dbo.regionsettings ADD CONSTRAINT
890 PK__regionse__5B35159D21B6055D PRIMARY KEY CLUSTERED
891 (
892 regionUUID
893 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
894
895COMMIT
896
897
898:VERSION 21
899
900BEGIN TRANSACTION
901
902ALTER TABLE prims ADD PassTouches bit not null default 0
903
904COMMIT
905
906
907:VERSION 22
908
909BEGIN TRANSACTION
910
911ALTER TABLE regionsettings ADD loaded_creation_date varchar(20)
912ALTER TABLE regionsettings ADD loaded_creation_time varchar(20)
913ALTER TABLE regionsettings ADD loaded_creation_id varchar(64)
914
915COMMIT
916
917:VERSION 23
918
919BEGIN TRANSACTION
920
921ALTER TABLE regionsettings DROP COLUMN loaded_creation_date
922ALTER TABLE regionsettings DROP COLUMN loaded_creation_time
923ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0
924
925COMMIT
926
927:VERSION 24
928
929BEGIN TRANSACTION
930
931ALTER TABLE prims ADD MediaURL varchar(255)
932ALTER TABLE primshapes ADD Media TEXT NULL
933
934COMMIT
935
936:VERSION 25
937
938BEGIN TRANSACTION
939CREATE TABLE "regionwindlight" (
940 "region_id" varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000',
941 "water_color_r" [float] NOT NULL DEFAULT '4.000000',
942 "water_color_g" [float] NOT NULL DEFAULT '38.000000',
943 "water_color_b" [float] NOT NULL DEFAULT '64.000000',
944 "water_fog_density_exponent" [float] NOT NULL DEFAULT '4.0',
945 "underwater_fog_modifier" [float] NOT NULL DEFAULT '0.25',
946 "reflection_wavelet_scale_1" [float] NOT NULL DEFAULT '2.0',
947 "reflection_wavelet_scale_2" [float] NOT NULL DEFAULT '2.0',
948 "reflection_wavelet_scale_3" [float] NOT NULL DEFAULT '2.0',
949 "fresnel_scale" [float] NOT NULL DEFAULT '0.40',
950 "fresnel_offset" [float] NOT NULL DEFAULT '0.50',
951 "refract_scale_above" [float] NOT NULL DEFAULT '0.03',
952 "refract_scale_below" [float] NOT NULL DEFAULT '0.20',
953 "blur_multiplier" [float] NOT NULL DEFAULT '0.040',
954 "big_wave_direction_x" [float] NOT NULL DEFAULT '1.05',
955 "big_wave_direction_y" [float] NOT NULL DEFAULT '-0.42',
956 "little_wave_direction_x" [float] NOT NULL DEFAULT '1.11',
957 "little_wave_direction_y" [float] NOT NULL DEFAULT '-1.16',
958 "normal_map_texture" varchar(36) NOT NULL DEFAULT '822ded49-9a6c-f61c-cb89-6df54f42cdf4',
959 "horizon_r" [float] NOT NULL DEFAULT '0.25',
960 "horizon_g" [float] NOT NULL DEFAULT '0.25',
961 "horizon_b" [float] NOT NULL DEFAULT '0.32',
962 "horizon_i" [float] NOT NULL DEFAULT '0.32',
963 "haze_horizon" [float] NOT NULL DEFAULT '0.19',
964 "blue_density_r" [float] NOT NULL DEFAULT '0.12',
965 "blue_density_g" [float] NOT NULL DEFAULT '0.22',
966 "blue_density_b" [float] NOT NULL DEFAULT '0.38',
967 "blue_density_i" [float] NOT NULL DEFAULT '0.38',
968 "haze_density" [float] NOT NULL DEFAULT '0.70',
969 "density_multiplier" [float] NOT NULL DEFAULT '0.18',
970 "distance_multiplier" [float] NOT NULL DEFAULT '0.8',
971 "max_altitude" int NOT NULL DEFAULT '1605',
972 "sun_moon_color_r" [float] NOT NULL DEFAULT '0.24',
973 "sun_moon_color_g" [float] NOT NULL DEFAULT '0.26',
974 "sun_moon_color_b" [float] NOT NULL DEFAULT '0.30',
975 "sun_moon_color_i" [float] NOT NULL DEFAULT '0.30',
976 "sun_moon_position" [float] NOT NULL DEFAULT '0.317',
977 "ambient_r" [float] NOT NULL DEFAULT '0.35',
978 "ambient_g" [float] NOT NULL DEFAULT '0.35',
979 "ambient_b" [float] NOT NULL DEFAULT '0.35',
980 "ambient_i" [float] NOT NULL DEFAULT '0.35',
981 "east_angle" [float] NOT NULL DEFAULT '0.00',
982 "sun_glow_focus" [float] NOT NULL DEFAULT '0.10',
983 "sun_glow_size" [float] NOT NULL DEFAULT '1.75',
984 "scene_gamma" [float] NOT NULL DEFAULT '1.00',
985 "star_brightness" [float] NOT NULL DEFAULT '0.00',
986 "cloud_color_r" [float] NOT NULL DEFAULT '0.41',
987 "cloud_color_g" [float] NOT NULL DEFAULT '0.41',
988 "cloud_color_b" [float] NOT NULL DEFAULT '0.41',
989 "cloud_color_i" [float] NOT NULL DEFAULT '0.41',
990 "cloud_x" [float] NOT NULL DEFAULT '1.00',
991 "cloud_y" [float] NOT NULL DEFAULT '0.53',
992 "cloud_density" [float] NOT NULL DEFAULT '1.00',
993 "cloud_coverage" [float] NOT NULL DEFAULT '0.27',
994 "cloud_scale" [float] NOT NULL DEFAULT '0.42',
995 "cloud_detail_x" [float] NOT NULL DEFAULT '1.00',
996 "cloud_detail_y" [float] NOT NULL DEFAULT '0.53',
997 "cloud_detail_density" [float] NOT NULL DEFAULT '0.12',
998 "cloud_scroll_x" [float] NOT NULL DEFAULT '0.20',
999 "cloud_scroll_x_lock" tinyint NOT NULL DEFAULT '0',
1000 "cloud_scroll_y" [float] NOT NULL DEFAULT '0.01',
1001 "cloud_scroll_y_lock" tinyint NOT NULL DEFAULT '0',
1002 "draw_classic_clouds" tinyint NOT NULL DEFAULT '1',
1003 PRIMARY KEY ("region_id")
1004)
1005
1006COMMIT
1007
1008:VERSION 26
1009
1010BEGIN TRANSACTION
1011
1012ALTER TABLE regionsettings ADD map_tile_ID CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'
1013
1014COMMIT
1015
1016:VERSION 27 #---------------------
1017
1018BEGIN TRANSACTION
1019ALTER TABLE land ADD MediaType VARCHAR(32) NOT NULL DEFAULT 'none/none'
1020ALTER TABLE land ADD MediaDescription VARCHAR(255) NOT NULL DEFAULT ''
1021ALTER TABLE land ADD MediaSize VARCHAR(16) NOT NULL DEFAULT '0,0'
1022ALTER TABLE land ADD MediaLoop bit NOT NULL DEFAULT 0
1023ALTER TABLE land ADD ObscureMusic bit NOT NULL DEFAULT 0
1024ALTER TABLE land ADD ObscureMedia bit NOT NULL DEFAULT 0
1025COMMIT
1026
1027:VERSION 28 #---------------------
1028
1029BEGIN TRANSACTION
1030
1031ALTER TABLE prims
1032ADD CONSTRAINT DF_prims_CreatorID
1033DEFAULT '00000000-0000-0000-0000-000000000000'
1034FOR CreatorID
1035
1036ALTER TABLE prims ALTER COLUMN CreatorID uniqueidentifier NOT NULL
1037
1038ALTER TABLE primitems
1039ADD CONSTRAINT DF_primitems_CreatorID
1040DEFAULT '00000000-0000-0000-0000-000000000000'
1041FOR CreatorID
1042
1043ALTER TABLE primitems ALTER COLUMN CreatorID uniqueidentifier NOT NULL
1044
1045COMMIT
1046
1047:VERSION 29 #----------------- Region Covenant changed time
1048
1049BEGIN TRANSACTION
1050
1051ALTER TABLE regionsettings ADD covenant_datetime int NOT NULL default 0
1052
1053COMMIT
1054
1055:VERSION 30 #------------------Migrate creatorID storage to varchars instead of UUIDs for HG support
1056
1057BEGIN TRANSACTION
1058
1059EXECUTE sp_rename N'dbo.prims.creatorid', N'creatoridold', 'COLUMN'
1060EXECUTE sp_rename N'dbo.primitems.creatorid', N'creatoridold', 'COLUMN'
1061
1062COMMIT
1063
1064:VERSION 31 #---------------------
1065
1066BEGIN TRANSACTION
1067
1068ALTER TABLE prims ADD CreatorID varchar(255)
1069ALTER TABLE primitems ADD CreatorID varchar(255)
1070
1071COMMIT
1072
1073:VERSION 32 #---------------------
1074
1075BEGIN TRANSACTION
1076
1077UPDATE prims SET prims.CreatorID = CONVERT(varchar(255), creatoridold)
1078UPDATE primitems SET primitems.CreatorID = CONVERT(varchar(255), creatoridold)
1079
1080COMMIT
1081
1082:VERSION 33 #---------------------
1083
1084BEGIN TRANSACTION
1085
1086ALTER TABLE prims
1087ADD CONSTRAINT DF_prims_CreatorIDNew
1088DEFAULT '00000000-0000-0000-0000-000000000000'
1089FOR CreatorID
1090
1091ALTER TABLE prims ALTER COLUMN CreatorID varchar(255) NOT NULL
1092
1093ALTER TABLE primitems
1094ADD CONSTRAINT DF_primitems_CreatorIDNew
1095DEFAULT '00000000-0000-0000-0000-000000000000'
1096FOR CreatorID
1097
1098ALTER TABLE primitems ALTER COLUMN CreatorID varchar(255) NOT NULL
1099
1100COMMIT
1101
1102:VERSION 34 #--------------- Telehub support
1103
1104BEGIN TRANSACTION
1105
1106CREATE TABLE [dbo].[Spawn_Points](
1107 [RegionUUID] [uniqueidentifier] NOT NULL,
1108 [Yaw] [float] NOT NULL,
1109 [Pitch] [float] NOT NULL,
1110 [Distance] [float] NOT NULL,
1111 PRIMARY KEY CLUSTERED
1112 (
1113 [RegionUUID] ASC
1114 )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
1115) ON [PRIMARY]
1116
1117ALTER TABLE regionsettings ADD TelehubObject uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
1118
1119COMMIT
1120
1121:VERSION 35 #---------------- Parcels for sale
1122
1123BEGIN TRANSACTION
1124
1125ALTER TABLE regionsettings ADD parcel_tile_ID uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
1126
1127COMMIT
1128
1129:VERSION 36 #---------------- Timed bans/access
1130
1131BEGIN TRANSACTION
1132
1133ALTER TABLE landaccesslist ADD Expires integer NOT NULL DEFAULT 0;
1134
1135COMMIT
1136
1137:VERSION 37 #---------------- Environment Settings
1138
1139BEGIN TRANSACTION
1140
1141CREATE TABLE [dbo].[regionenvironment](
1142 [region_id] [uniqueidentifier] NOT NULL,
1143 [llsd_settings] [varchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
1144 PRIMARY KEY CLUSTERED
1145(
1146 [region_id] ASC
1147)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
1148) ON [PRIMARY]
1149
1150COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/UserAccount.migrations b/OpenSim/Data/MSSQL/Resources/UserAccount.migrations
deleted file mode 100644
index a81704d..0000000
--- a/OpenSim/Data/MSSQL/Resources/UserAccount.migrations
+++ /dev/null
@@ -1,55 +0,0 @@
1:VERSION 1
2
3CREATE TABLE [UserAccounts] (
4 [PrincipalID] uniqueidentifier NOT NULL,
5 [ScopeID] uniqueidentifier NOT NULL,
6 [FirstName] [varchar](64) NOT NULL,
7 [LastName] [varchar](64) NOT NULL,
8 [Email] [varchar](64) NULL,
9 [ServiceURLs] [text] NULL,
10 [Created] [int] default NULL,
11
12 PRIMARY KEY CLUSTERED
13(
14 [PrincipalID] ASC
15)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
16) ON [PRIMARY]
17
18
19:VERSION 2
20
21BEGIN TRANSACTION
22IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users]') AND type in (N'U'))
23INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID,
24username AS FirstName,
25lastname AS LastName,
26email as Email, (
27'AssetServerURI=' +
28userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS ServiceURLs,
29created as Created FROM users;
30
31
32COMMIT
33
34:VERSION 3
35
36BEGIN TRANSACTION
37
38CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID);
39CREATE INDEX Email ON UserAccounts(Email);
40CREATE INDEX FirstName ON UserAccounts(FirstName);
41CREATE INDEX LastName ON UserAccounts(LastName);
42CREATE INDEX Name ON UserAccounts(FirstName,LastName);
43
44COMMIT
45
46:VERSION 4
47
48BEGIN TRANSACTION
49
50ALTER TABLE UserAccounts ADD UserLevel integer NOT NULL DEFAULT 0;
51ALTER TABLE UserAccounts ADD UserFlags integer NOT NULL DEFAULT 0;
52ALTER TABLE UserAccounts ADD UserTitle varchar(64) NOT NULL DEFAULT '';
53
54COMMIT
55
diff --git a/OpenSim/Data/MSSQL/Resources/UserStore.migrations b/OpenSim/Data/MSSQL/Resources/UserStore.migrations
deleted file mode 100644
index 050c544..0000000
--- a/OpenSim/Data/MSSQL/Resources/UserStore.migrations
+++ /dev/null
@@ -1,421 +0,0 @@
1:VERSION 1
2
3CREATE TABLE [users] (
4 [UUID] [varchar](36) NOT NULL default '',
5 [username] [varchar](32) NOT NULL,
6 [lastname] [varchar](32) NOT NULL,
7 [passwordHash] [varchar](32) NOT NULL,
8 [passwordSalt] [varchar](32) NOT NULL,
9 [homeRegion] [bigint] default NULL,
10 [homeLocationX] [float] default NULL,
11 [homeLocationY] [float] default NULL,
12 [homeLocationZ] [float] default NULL,
13 [homeLookAtX] [float] default NULL,
14 [homeLookAtY] [float] default NULL,
15 [homeLookAtZ] [float] default NULL,
16 [created] [int] NOT NULL,
17 [lastLogin] [int] NOT NULL,
18 [userInventoryURI] [varchar](255) default NULL,
19 [userAssetURI] [varchar](255) default NULL,
20 [profileCanDoMask] [int] default NULL,
21 [profileWantDoMask] [int] default NULL,
22 [profileAboutText] [ntext],
23 [profileFirstText] [ntext],
24 [profileImage] [varchar](36) default NULL,
25 [profileFirstImage] [varchar](36) default NULL,
26 [webLoginKey] [varchar](36) default NULL,
27 PRIMARY KEY CLUSTERED
28(
29 [UUID] ASC
30)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
31) ON [PRIMARY]
32
33
34CREATE NONCLUSTERED INDEX [usernames] ON [users]
35(
36 [username] ASC,
37 [lastname] ASC
38)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
39
40
41CREATE TABLE [agents] (
42 [UUID] [varchar](36) NOT NULL,
43 [sessionID] [varchar](36) NOT NULL,
44 [secureSessionID] [varchar](36) NOT NULL,
45 [agentIP] [varchar](16) NOT NULL,
46 [agentPort] [int] NOT NULL,
47 [agentOnline] [tinyint] NOT NULL,
48 [loginTime] [int] NOT NULL,
49 [logoutTime] [int] NOT NULL,
50 [currentRegion] [varchar](36) NOT NULL,
51 [currentHandle] [bigint] NOT NULL,
52 [currentPos] [varchar](64) NOT NULL,
53 PRIMARY KEY CLUSTERED
54(
55 [UUID] ASC
56)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
57) ON [PRIMARY]
58
59
60CREATE NONCLUSTERED INDEX [session] ON [agents]
61(
62 [sessionID] ASC
63)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
64
65CREATE NONCLUSTERED INDEX [ssession] ON [agents]
66(
67 [secureSessionID] ASC
68)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
69
70
71CREATE TABLE [dbo].[userfriends](
72 [ownerID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL,
73 [friendID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL,
74 [friendPerms] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
75 [datetimestamp] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
76) ON [PRIMARY]
77
78CREATE TABLE [avatarappearance] (
79 [Owner] [varchar](36) NOT NULL,
80 [Serial] int NOT NULL,
81 [Visual_Params] [image] NOT NULL,
82 [Texture] [image] NOT NULL,
83 [Avatar_Height] float NOT NULL,
84 [Body_Item] [varchar](36) NOT NULL,
85 [Body_Asset] [varchar](36) NOT NULL,
86 [Skin_Item] [varchar](36) NOT NULL,
87 [Skin_Asset] [varchar](36) NOT NULL,
88 [Hair_Item] [varchar](36) NOT NULL,
89 [Hair_Asset] [varchar](36) NOT NULL,
90 [Eyes_Item] [varchar](36) NOT NULL,
91 [Eyes_Asset] [varchar](36) NOT NULL,
92 [Shirt_Item] [varchar](36) NOT NULL,
93 [Shirt_Asset] [varchar](36) NOT NULL,
94 [Pants_Item] [varchar](36) NOT NULL,
95 [Pants_Asset] [varchar](36) NOT NULL,
96 [Shoes_Item] [varchar](36) NOT NULL,
97 [Shoes_Asset] [varchar](36) NOT NULL,
98 [Socks_Item] [varchar](36) NOT NULL,
99 [Socks_Asset] [varchar](36) NOT NULL,
100 [Jacket_Item] [varchar](36) NOT NULL,
101 [Jacket_Asset] [varchar](36) NOT NULL,
102 [Gloves_Item] [varchar](36) NOT NULL,
103 [Gloves_Asset] [varchar](36) NOT NULL,
104 [Undershirt_Item] [varchar](36) NOT NULL,
105 [Undershirt_Asset] [varchar](36) NOT NULL,
106 [Underpants_Item] [varchar](36) NOT NULL,
107 [Underpants_Asset] [varchar](36) NOT NULL,
108 [Skirt_Item] [varchar](36) NOT NULL,
109 [Skirt_Asset] [varchar](36) NOT NULL,
110
111 PRIMARY KEY CLUSTERED (
112 [Owner]
113 ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
114) ON [PRIMARY]
115
116:VERSION 2
117
118BEGIN TRANSACTION
119
120ALTER TABLE users ADD homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
121ALTER TABLE users ADD userFlags int NOT NULL default 0;
122ALTER TABLE users ADD godLevel int NOT NULL default 0;
123ALTER TABLE users ADD customType varchar(32) not null default '';
124ALTER TABLE users ADD partner varchar(36) not null default '00000000-0000-0000-0000-000000000000';
125
126COMMIT
127
128
129:VERSION 3
130
131BEGIN TRANSACTION
132
133CREATE TABLE [avatarattachments] (
134 [UUID] varchar(36) NOT NULL
135 , [attachpoint] int NOT NULL
136 , [item] varchar(36) NOT NULL
137 , [asset] varchar(36) NOT NULL)
138
139CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments
140 (
141 UUID
142 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
143
144
145COMMIT
146
147
148:VERSION 4
149
150BEGIN TRANSACTION
151
152CREATE TABLE Tmp_userfriends
153 (
154 ownerID varchar(36) NOT NULL,
155 friendID varchar(36) NOT NULL,
156 friendPerms int NOT NULL,
157 datetimestamp int NOT NULL
158 ) ON [PRIMARY]
159
160IF EXISTS(SELECT * FROM userfriends)
161 EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp)
162 SELECT CONVERT(varchar(36), ownerID), CONVERT(varchar(36), friendID), CONVERT(int, friendPerms), CONVERT(int, datetimestamp) FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)')
163
164DROP TABLE dbo.userfriends
165
166EXECUTE sp_rename N'Tmp_userfriends', N'userfriends', 'OBJECT'
167
168CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON userfriends
169 (
170 ownerID
171 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
172
173CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON userfriends
174 (
175 friendID
176 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
177
178COMMIT
179
180
181:VERSION 5
182
183BEGIN TRANSACTION
184
185 ALTER TABLE users add email varchar(250);
186
187COMMIT
188
189
190:VERSION 6
191
192BEGIN TRANSACTION
193
194CREATE TABLE dbo.Tmp_users
195 (
196 UUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
197 username varchar(32) NOT NULL,
198 lastname varchar(32) NOT NULL,
199 passwordHash varchar(32) NOT NULL,
200 passwordSalt varchar(32) NOT NULL,
201 homeRegion bigint NULL DEFAULT (NULL),
202 homeLocationX float(53) NULL DEFAULT (NULL),
203 homeLocationY float(53) NULL DEFAULT (NULL),
204 homeLocationZ float(53) NULL DEFAULT (NULL),
205 homeLookAtX float(53) NULL DEFAULT (NULL),
206 homeLookAtY float(53) NULL DEFAULT (NULL),
207 homeLookAtZ float(53) NULL DEFAULT (NULL),
208 created int NOT NULL,
209 lastLogin int NOT NULL,
210 userInventoryURI varchar(255) NULL DEFAULT (NULL),
211 userAssetURI varchar(255) NULL DEFAULT (NULL),
212 profileCanDoMask int NULL DEFAULT (NULL),
213 profileWantDoMask int NULL DEFAULT (NULL),
214 profileAboutText ntext NULL,
215 profileFirstText ntext NULL,
216 profileImage uniqueidentifier NULL DEFAULT (NULL),
217 profileFirstImage uniqueidentifier NULL DEFAULT (NULL),
218 webLoginKey uniqueidentifier NULL DEFAULT (NULL),
219 homeRegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
220 userFlags int NOT NULL DEFAULT ((0)),
221 godLevel int NOT NULL DEFAULT ((0)),
222 customType varchar(32) NOT NULL DEFAULT (''),
223 partner uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
224 email varchar(250) NULL
225 ) ON [PRIMARY]
226 TEXTIMAGE_ON [PRIMARY]
227
228IF EXISTS(SELECT * FROM dbo.users)
229 EXEC('INSERT INTO dbo.Tmp_users (UUID, username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, profileImage, profileFirstImage, webLoginKey, homeRegionID, userFlags, godLevel, customType, partner, email)
230 SELECT CONVERT(uniqueidentifier, UUID), username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, CONVERT(uniqueidentifier, profileImage), CONVERT(uniqueidentifier, profileFirstImage), CONVERT(uniqueidentifier, webLoginKey), CONVERT(uniqueidentifier, homeRegionID), userFlags, godLevel, customType, CONVERT(uniqueidentifier, partner), email FROM dbo.users WITH (HOLDLOCK TABLOCKX)')
231
232DROP TABLE dbo.users
233
234EXECUTE sp_rename N'dbo.Tmp_users', N'users', 'OBJECT'
235
236ALTER TABLE dbo.users ADD CONSTRAINT
237 PK__users__65A475E737A5467C PRIMARY KEY CLUSTERED
238 (
239 UUID
240 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
241
242CREATE NONCLUSTERED INDEX usernames ON dbo.users
243 (
244 username,
245 lastname
246 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
247
248COMMIT
249
250
251:VERSION 7
252
253BEGIN TRANSACTION
254
255CREATE TABLE dbo.Tmp_agents
256 (
257 UUID uniqueidentifier NOT NULL,
258 sessionID uniqueidentifier NOT NULL,
259 secureSessionID uniqueidentifier NOT NULL,
260 agentIP varchar(16) NOT NULL,
261 agentPort int NOT NULL,
262 agentOnline tinyint NOT NULL,
263 loginTime int NOT NULL,
264 logoutTime int NOT NULL,
265 currentRegion uniqueidentifier NOT NULL,
266 currentHandle bigint NOT NULL,
267 currentPos varchar(64) NOT NULL
268 ) ON [PRIMARY]
269
270IF EXISTS(SELECT * FROM dbo.agents)
271 EXEC('INSERT INTO dbo.Tmp_agents (UUID, sessionID, secureSessionID, agentIP, agentPort, agentOnline, loginTime, logoutTime, currentRegion, currentHandle, currentPos)
272 SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, sessionID), CONVERT(uniqueidentifier, secureSessionID), agentIP, agentPort, agentOnline, loginTime, logoutTime, CONVERT(uniqueidentifier, currentRegion), currentHandle, currentPos FROM dbo.agents WITH (HOLDLOCK TABLOCKX)')
273
274DROP TABLE dbo.agents
275
276EXECUTE sp_rename N'dbo.Tmp_agents', N'agents', 'OBJECT'
277
278ALTER TABLE dbo.agents ADD CONSTRAINT
279 PK__agents__65A475E749C3F6B7 PRIMARY KEY CLUSTERED
280 (
281 UUID
282 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
283
284CREATE NONCLUSTERED INDEX session ON dbo.agents
285 (
286 sessionID
287 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
288
289CREATE NONCLUSTERED INDEX ssession ON dbo.agents
290 (
291 secureSessionID
292 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
293
294COMMIT
295
296
297:VERSION 8
298
299BEGIN TRANSACTION
300
301CREATE TABLE dbo.Tmp_userfriends
302 (
303 ownerID uniqueidentifier NOT NULL,
304 friendID uniqueidentifier NOT NULL,
305 friendPerms int NOT NULL,
306 datetimestamp int NOT NULL
307 ) ON [PRIMARY]
308
309IF EXISTS(SELECT * FROM dbo.userfriends)
310 EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp)
311 SELECT CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, friendID), friendPerms, datetimestamp FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)')
312
313DROP TABLE dbo.userfriends
314
315EXECUTE sp_rename N'dbo.Tmp_userfriends', N'userfriends', 'OBJECT'
316
317CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON dbo.userfriends
318 (
319 ownerID
320 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
321
322CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON dbo.userfriends
323 (
324 friendID
325 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
326
327COMMIT
328
329
330:VERSION 9
331
332BEGIN TRANSACTION
333
334CREATE TABLE dbo.Tmp_avatarappearance
335 (
336 Owner uniqueidentifier NOT NULL,
337 Serial int NOT NULL,
338 Visual_Params image NOT NULL,
339 Texture image NOT NULL,
340 Avatar_Height float(53) NOT NULL,
341 Body_Item uniqueidentifier NOT NULL,
342 Body_Asset uniqueidentifier NOT NULL,
343 Skin_Item uniqueidentifier NOT NULL,
344 Skin_Asset uniqueidentifier NOT NULL,
345 Hair_Item uniqueidentifier NOT NULL,
346 Hair_Asset uniqueidentifier NOT NULL,
347 Eyes_Item uniqueidentifier NOT NULL,
348 Eyes_Asset uniqueidentifier NOT NULL,
349 Shirt_Item uniqueidentifier NOT NULL,
350 Shirt_Asset uniqueidentifier NOT NULL,
351 Pants_Item uniqueidentifier NOT NULL,
352 Pants_Asset uniqueidentifier NOT NULL,
353 Shoes_Item uniqueidentifier NOT NULL,
354 Shoes_Asset uniqueidentifier NOT NULL,
355 Socks_Item uniqueidentifier NOT NULL,
356 Socks_Asset uniqueidentifier NOT NULL,
357 Jacket_Item uniqueidentifier NOT NULL,
358 Jacket_Asset uniqueidentifier NOT NULL,
359 Gloves_Item uniqueidentifier NOT NULL,
360 Gloves_Asset uniqueidentifier NOT NULL,
361 Undershirt_Item uniqueidentifier NOT NULL,
362 Undershirt_Asset uniqueidentifier NOT NULL,
363 Underpants_Item uniqueidentifier NOT NULL,
364 Underpants_Asset uniqueidentifier NOT NULL,
365 Skirt_Item uniqueidentifier NOT NULL,
366 Skirt_Asset uniqueidentifier NOT NULL
367 ) ON [PRIMARY]
368 TEXTIMAGE_ON [PRIMARY]
369
370IF EXISTS(SELECT * FROM dbo.avatarappearance)
371 EXEC('INSERT INTO dbo.Tmp_avatarappearance (Owner, Serial, Visual_Params, Texture, Avatar_Height, Body_Item, Body_Asset, Skin_Item, Skin_Asset, Hair_Item, Hair_Asset, Eyes_Item, Eyes_Asset, Shirt_Item, Shirt_Asset, Pants_Item, Pants_Asset, Shoes_Item, Shoes_Asset, Socks_Item, Socks_Asset, Jacket_Item, Jacket_Asset, Gloves_Item, Gloves_Asset, Undershirt_Item, Undershirt_Asset, Underpants_Item, Underpants_Asset, Skirt_Item, Skirt_Asset)
372 SELECT CONVERT(uniqueidentifier, Owner), Serial, Visual_Params, Texture, Avatar_Height, CONVERT(uniqueidentifier, Body_Item), CONVERT(uniqueidentifier, Body_Asset), CONVERT(uniqueidentifier, Skin_Item), CONVERT(uniqueidentifier, Skin_Asset), CONVERT(uniqueidentifier, Hair_Item), CONVERT(uniqueidentifier, Hair_Asset), CONVERT(uniqueidentifier, Eyes_Item), CONVERT(uniqueidentifier, Eyes_Asset), CONVERT(uniqueidentifier, Shirt_Item), CONVERT(uniqueidentifier, Shirt_Asset), CONVERT(uniqueidentifier, Pants_Item), CONVERT(uniqueidentifier, Pants_Asset), CONVERT(uniqueidentifier, Shoes_Item), CONVERT(uniqueidentifier, Shoes_Asset), CONVERT(uniqueidentifier, Socks_Item), CONVERT(uniqueidentifier, Socks_Asset), CONVERT(uniqueidentifier, Jacket_Item), CONVERT(uniqueidentifier, Jacket_Asset), CONVERT(uniqueidentifier, Gloves_Item), CONVERT(uniqueidentifier, Gloves_Asset), CONVERT(uniqueidentifier, Undershirt_Item), CONVERT(uniqueidentifier, Undershirt_Asset), CONVERT(uniqueidentifier, Underpants_Item), CONVERT(uniqueidentifier, Underpants_Asset), CONVERT(uniqueidentifier, Skirt_Item), CONVERT(uniqueidentifier, Skirt_Asset) FROM dbo.avatarappearance WITH (HOLDLOCK TABLOCKX)')
373
374DROP TABLE dbo.avatarappearance
375
376EXECUTE sp_rename N'dbo.Tmp_avatarappearance', N'avatarappearance', 'OBJECT'
377
378ALTER TABLE dbo.avatarappearance ADD CONSTRAINT
379 PK__avatarap__7DD115CC4E88ABD4 PRIMARY KEY CLUSTERED
380 (
381 Owner
382 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
383
384COMMIT
385
386
387:VERSION 10
388
389BEGIN TRANSACTION
390
391CREATE TABLE dbo.Tmp_avatarattachments
392 (
393 UUID uniqueidentifier NOT NULL,
394 attachpoint int NOT NULL,
395 item uniqueidentifier NOT NULL,
396 asset uniqueidentifier NOT NULL
397 ) ON [PRIMARY]
398
399IF EXISTS(SELECT * FROM dbo.avatarattachments)
400 EXEC('INSERT INTO dbo.Tmp_avatarattachments (UUID, attachpoint, item, asset)
401 SELECT CONVERT(uniqueidentifier, UUID), attachpoint, CONVERT(uniqueidentifier, item), CONVERT(uniqueidentifier, asset) FROM dbo.avatarattachments WITH (HOLDLOCK TABLOCKX)')
402
403DROP TABLE dbo.avatarattachments
404
405EXECUTE sp_rename N'dbo.Tmp_avatarattachments', N'avatarattachments', 'OBJECT'
406
407CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments
408 (
409 UUID
410 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
411
412COMMIT
413
414
415:VERSION 11
416
417BEGIN TRANSACTION
418
419ALTER TABLE users ADD scopeID uniqueidentifier not null default '00000000-0000-0000-0000-000000000000'
420
421COMMIT