diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/AssetStore.migrations | 106 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/AuthStore.migrations | 32 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/Avatar.migrations | 64 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/EstateStore.migrations | 334 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/FriendsStore.migrations | 50 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/GridStore.migrations | 245 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/GridUserStore.migrations | 65 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/InventoryStore.migrations | 279 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/LogStore.migrations | 19 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/Presence.migrations | 31 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/RegionStore.migrations | 1150 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/UserAccount.migrations | 55 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/UserStore.migrations | 421 |
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 | |||
3 | CREATE 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, | ||
11 | PRIMARY 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 | |||
20 | BEGIN TRANSACTION | ||
21 | |||
22 | CREATE 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 | |||
34 | IF 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 | |||
38 | DROP TABLE assets | ||
39 | |||
40 | EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT' | ||
41 | |||
42 | ALTER 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 | |||
48 | COMMIT | ||
49 | |||
50 | |||
51 | :VERSION 3 | ||
52 | |||
53 | BEGIN TRANSACTION | ||
54 | |||
55 | ALTER TABLE assets add create_time integer default 0 | ||
56 | ALTER TABLE assets add access_time integer default 0 | ||
57 | |||
58 | COMMIT | ||
59 | |||
60 | |||
61 | :VERSION 4 | ||
62 | |||
63 | BEGIN TRANSACTION | ||
64 | |||
65 | CREATE 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 | |||
79 | IF 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 | |||
83 | DROP TABLE assets | ||
84 | |||
85 | EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT' | ||
86 | |||
87 | ALTER 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 | |||
93 | COMMIT | ||
94 | |||
95 | |||
96 | :VERSION 5 | ||
97 | |||
98 | DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621'; | ||
99 | |||
100 | :VERSION 6 | ||
101 | |||
102 | ALTER TABLE assets ADD asset_flags INTEGER NOT NULL DEFAULT 0; | ||
103 | |||
104 | :VERSION 7 | ||
105 | |||
106 | alter 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 | |||
3 | BEGIN TRANSACTION | ||
4 | |||
5 | CREATE 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 | |||
13 | CREATE 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 | |||
19 | COMMIT | ||
20 | |||
21 | :VERSION 2 | ||
22 | |||
23 | BEGIN TRANSACTION | ||
24 | |||
25 | IF 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 | |||
28 | COMMIT | ||
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 | |||
3 | BEGIN TRANSACTION | ||
4 | |||
5 | CREATE TABLE [Avatars] ( | ||
6 | [PrincipalID] uniqueidentifier NOT NULL, | ||
7 | [Name] varchar(32) NOT NULL, | ||
8 | [Value] varchar(255) NOT NULL DEFAULT '', | ||
9 | PRIMARY 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 | |||
16 | COMMIT | ||
17 | |||
18 | :VERSION 2 | ||
19 | |||
20 | BEGIN TRANSACTION | ||
21 | |||
22 | CREATE 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 | |||
30 | IF 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 | |||
34 | DROP TABLE dbo.Avatars | ||
35 | |||
36 | EXECUTE sp_rename N'dbo.Tmp_Avatars', N'Avatars', 'OBJECT' | ||
37 | |||
38 | COMMIT | ||
39 | |||
40 | :VERSION 3 | ||
41 | |||
42 | BEGIN TRANSACTION | ||
43 | |||
44 | CREATE 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 | |||
56 | IF 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 | |||
60 | DROP TABLE dbo.Avatars | ||
61 | |||
62 | EXECUTE sp_rename N'dbo.Tmp_Avatars', N'Avatars', 'OBJECT' | ||
63 | COMMIT | ||
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 | |||
3 | BEGIN TRANSACTION | ||
4 | |||
5 | CREATE 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 | |||
14 | CREATE 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 | |||
24 | CREATE 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 | |||
34 | CREATE 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 | |||
46 | CREATE 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 | |||
78 | CREATE 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 | |||
87 | COMMIT | ||
88 | |||
89 | :VERSION 2 | ||
90 | |||
91 | BEGIN TRANSACTION | ||
92 | |||
93 | ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers | ||
94 | |||
95 | CREATE 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 | |||
100 | ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups | ||
101 | |||
102 | CREATE 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 | |||
108 | ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users | ||
109 | |||
110 | CREATE 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 | |||
115 | COMMIT | ||
116 | |||
117 | |||
118 | :VERSION 3 | ||
119 | |||
120 | BEGIN TRANSACTION | ||
121 | |||
122 | CREATE 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 | |||
131 | IF 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 | |||
135 | DROP TABLE dbo.estateban | ||
136 | |||
137 | EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT' | ||
138 | |||
139 | CREATE 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 | |||
144 | COMMIT | ||
145 | |||
146 | |||
147 | :VERSION 4 | ||
148 | |||
149 | BEGIN TRANSACTION | ||
150 | |||
151 | CREATE TABLE dbo.Tmp_estate_managers | ||
152 | ( | ||
153 | EstateID int NOT NULL, | ||
154 | uuid uniqueidentifier NOT NULL | ||
155 | ) ON [PRIMARY] | ||
156 | |||
157 | IF 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 | |||
161 | DROP TABLE dbo.estate_managers | ||
162 | |||
163 | EXECUTE sp_rename N'dbo.Tmp_estate_managers', N'estate_managers', 'OBJECT' | ||
164 | |||
165 | CREATE 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 | |||
170 | COMMIT | ||
171 | |||
172 | |||
173 | :VERSION 5 | ||
174 | |||
175 | BEGIN TRANSACTION | ||
176 | |||
177 | CREATE TABLE dbo.Tmp_estate_groups | ||
178 | ( | ||
179 | EstateID int NOT NULL, | ||
180 | uuid uniqueidentifier NOT NULL | ||
181 | ) ON [PRIMARY] | ||
182 | |||
183 | IF 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 | |||
187 | DROP TABLE dbo.estate_groups | ||
188 | |||
189 | EXECUTE sp_rename N'dbo.Tmp_estate_groups', N'estate_groups', 'OBJECT' | ||
190 | |||
191 | CREATE 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 | |||
196 | COMMIT | ||
197 | |||
198 | |||
199 | :VERSION 6 | ||
200 | |||
201 | BEGIN TRANSACTION | ||
202 | |||
203 | CREATE TABLE dbo.Tmp_estate_users | ||
204 | ( | ||
205 | EstateID int NOT NULL, | ||
206 | uuid uniqueidentifier NOT NULL | ||
207 | ) ON [PRIMARY] | ||
208 | |||
209 | IF 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 | |||
213 | DROP TABLE dbo.estate_users | ||
214 | |||
215 | EXECUTE sp_rename N'dbo.Tmp_estate_users', N'estate_users', 'OBJECT' | ||
216 | |||
217 | CREATE 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 | |||
222 | COMMIT | ||
223 | |||
224 | |||
225 | :VERSION 7 | ||
226 | |||
227 | BEGIN TRANSACTION | ||
228 | |||
229 | CREATE 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 | |||
238 | IF 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 | |||
242 | DROP TABLE dbo.estateban | ||
243 | |||
244 | EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT' | ||
245 | |||
246 | CREATE 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 | |||
251 | COMMIT | ||
252 | |||
253 | |||
254 | :VERSION 8 | ||
255 | |||
256 | BEGIN TRANSACTION | ||
257 | |||
258 | CREATE 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 | |||
286 | SET IDENTITY_INSERT dbo.Tmp_estate_settings ON | ||
287 | |||
288 | IF 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 | |||
292 | SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF | ||
293 | |||
294 | DROP TABLE dbo.estate_settings | ||
295 | |||
296 | EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT' | ||
297 | |||
298 | ALTER 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 | |||
304 | COMMIT | ||
305 | |||
306 | |||
307 | :VERSION 9 | ||
308 | |||
309 | BEGIN TRANSACTION | ||
310 | |||
311 | CREATE 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 | |||
317 | IF 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 | |||
321 | DROP TABLE dbo.estate_map | ||
322 | |||
323 | EXECUTE sp_rename N'dbo.Tmp_estate_map', N'estate_map', 'OBJECT' | ||
324 | |||
325 | ALTER 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 | |||
332 | COMMIT | ||
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 | |||
3 | BEGIN TRANSACTION | ||
4 | |||
5 | CREATE 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 | |||
12 | COMMIT | ||
13 | |||
14 | :VERSION 2 | ||
15 | |||
16 | BEGIN TRANSACTION | ||
17 | |||
18 | IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[userfriends]') AND type in (N'U')) | ||
19 | INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) | ||
20 | SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends; | ||
21 | |||
22 | COMMIT | ||
23 | |||
24 | :VERSION 3 | ||
25 | |||
26 | BEGIN TRANSACTION | ||
27 | |||
28 | CREATE 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) | ||
33 | ON [PRIMARY] | ||
34 | |||
35 | |||
36 | IF 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 | |||
40 | DROP TABLE dbo.Friends | ||
41 | |||
42 | EXECUTE sp_rename N'dbo.Tmp_Friends', N'Friends', 'OBJECT' | ||
43 | |||
44 | ALTER 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 | |||
50 | COMMIT \ 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 | |||
3 | BEGIN TRANSACTION | ||
4 | |||
5 | CREATE 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, | ||
33 | PRIMARY KEY CLUSTERED | ||
34 | ( | ||
35 | [uuid] ASC | ||
36 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
37 | ) ON [PRIMARY] | ||
38 | |||
39 | COMMIT | ||
40 | |||
41 | |||
42 | :VERSION 2 | ||
43 | |||
44 | BEGIN TRANSACTION | ||
45 | |||
46 | CREATE 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 | |||
78 | IF 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 | |||
82 | DROP TABLE regions | ||
83 | |||
84 | EXECUTE sp_rename N'Tmp_regions', N'regions', 'OBJECT' | ||
85 | |||
86 | ALTER 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 | |||
92 | COMMIT | ||
93 | |||
94 | :VERSION 3 | ||
95 | |||
96 | BEGIN TRANSACTION | ||
97 | |||
98 | CREATE 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 | |||
103 | CREATE 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 | |||
109 | CREATE 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 | |||
117 | COMMIT | ||
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.*/ | ||
123 | BEGIN TRANSACTION | ||
124 | |||
125 | CREATE 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 | |||
157 | IF 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 | |||
161 | DROP TABLE dbo.regions | ||
162 | |||
163 | EXECUTE sp_rename N'dbo.Tmp_regions', N'regions', 'OBJECT' | ||
164 | |||
165 | ALTER 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 | |||
171 | CREATE 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 | |||
176 | CREATE 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 | |||
181 | CREATE 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 | |||
189 | COMMIT | ||
190 | |||
191 | |||
192 | :VERSION 5 | ||
193 | |||
194 | BEGIN TRANSACTION | ||
195 | |||
196 | ALTER TABLE regions ADD access int default 0; | ||
197 | |||
198 | COMMIT | ||
199 | |||
200 | |||
201 | :VERSION 6 | ||
202 | |||
203 | BEGIN TRANSACTION | ||
204 | |||
205 | ALTER TABLE regions ADD scopeid uniqueidentifier default '00000000-0000-0000-0000-000000000000'; | ||
206 | ALTER TABLE regions ADD DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [owner_uuid]; | ||
207 | ALTER TABLE regions ADD sizeX integer not null default 0; | ||
208 | ALTER TABLE regions ADD sizeY integer not null default 0; | ||
209 | |||
210 | COMMIT | ||
211 | |||
212 | |||
213 | :VERSION 7 | ||
214 | |||
215 | BEGIN TRANSACTION | ||
216 | |||
217 | ALTER TABLE regions ADD [flags] integer NOT NULL DEFAULT 0; | ||
218 | CREATE INDEX [flags] ON regions(flags); | ||
219 | ALTER TABLE [regions] ADD [last_seen] integer NOT NULL DEFAULT 0; | ||
220 | ALTER TABLE [regions] ADD [PrincipalID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; | ||
221 | ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0; | ||
222 | |||
223 | COMMIT | ||
224 | |||
225 | :VERSION 8 | ||
226 | |||
227 | BEGIN TRANSACTION | ||
228 | ALTER TABLE regions ALTER COLUMN regionName VarChar(128) | ||
229 | |||
230 | DROP INDEX IX_regions_name ON dbo.regions | ||
231 | ALTER TABLE regions ALTER COLUMN regionName VarChar(128) null | ||
232 | |||
233 | CREATE 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 | |||
238 | COMMIT | ||
239 | |||
240 | :VERSION 9 | ||
241 | |||
242 | BEGIN TRANSACTION | ||
243 | ALTER TABLE regions ADD parcelMapTexture uniqueidentifier NULL; | ||
244 | |||
245 | COMMIT | ||
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 | |||
3 | BEGIN TRANSACTION | ||
4 | |||
5 | CREATE 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 | |||
19 | COMMIT | ||
20 | |||
21 | :VERSION 2 # -------------------------- | ||
22 | |||
23 | BEGIN TRANSACTION | ||
24 | |||
25 | CREATE 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 | |||
43 | COMMIT | ||
44 | |||
45 | IF 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 | |||
63 | DROP TABLE dbo.GridUser | ||
64 | |||
65 | EXECUTE 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 | |||
3 | BEGIN TRANSACTION | ||
4 | |||
5 | CREATE 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 | |||
18 | CREATE 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 | |||
23 | CREATE 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 | |||
29 | CREATE 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 | |||
56 | CREATE 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 | |||
61 | CREATE 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 | |||
66 | COMMIT | ||
67 | |||
68 | |||
69 | :VERSION 2 | ||
70 | |||
71 | BEGIN TRANSACTION | ||
72 | |||
73 | ALTER TABLE inventoryitems ADD inventoryGroupPermissions INTEGER NOT NULL default 0 | ||
74 | |||
75 | COMMIT | ||
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.*/ | ||
80 | BEGIN TRANSACTION | ||
81 | |||
82 | CREATE 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 | |||
92 | IF 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 | |||
96 | DROP TABLE dbo.inventoryfolders | ||
97 | |||
98 | EXECUTE sp_rename N'dbo.Tmp_inventoryfolders', N'inventoryfolders', 'OBJECT' | ||
99 | |||
100 | ALTER 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 | |||
106 | CREATE 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 | |||
111 | CREATE 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 | |||
116 | COMMIT | ||
117 | |||
118 | |||
119 | :VERSION 4 | ||
120 | |||
121 | BEGIN TRANSACTION | ||
122 | |||
123 | CREATE 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 | |||
147 | IF 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 | |||
151 | DROP TABLE dbo.inventoryitems | ||
152 | |||
153 | EXECUTE sp_rename N'dbo.Tmp_inventoryitems', N'inventoryitems', 'OBJECT' | ||
154 | |||
155 | ALTER 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 | |||
162 | CREATE 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 | |||
167 | CREATE 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 | |||
172 | COMMIT | ||
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 | |||
186 | BEGIN TRANSACTION | ||
187 | DECLARE @nm varchar(80); | ||
188 | DECLARE x CURSOR LOCAL FORWARD_ONLY READ_ONLY | ||
189 | FOR SELECT name FROM sys.default_constraints where parent_object_id = OBJECT_ID('inventoryitems'); | ||
190 | OPEN x; | ||
191 | FETCH NEXT FROM x INTO @nm; | ||
192 | WHILE @@FETCH_STATUS = 0 | ||
193 | BEGIN | ||
194 | EXEC('alter table inventoryitems drop ' + @nm); | ||
195 | FETCH NEXT FROM x INTO @nm; | ||
196 | END | ||
197 | CLOSE x | ||
198 | DEALLOCATE x | ||
199 | COMMIT | ||
200 | |||
201 | # all DEFAULTs dropped! | ||
202 | |||
203 | :GO | ||
204 | |||
205 | BEGIN 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 | |||
210 | alter table inventoryitems | ||
211 | add constraint def_baseperm default 0 for inventoryBasePermissions | ||
212 | alter table inventoryitems | ||
213 | add constraint def_allperm default 0 for inventoryEveryOnePermissions | ||
214 | alter table inventoryitems | ||
215 | add constraint def_grpperm default 0 for inventoryGroupPermissions | ||
216 | |||
217 | COMMIT | ||
218 | |||
219 | :VERSION 7 | ||
220 | |||
221 | BEGIN TRANSACTION | ||
222 | |||
223 | # CreatorID goes back to VARCHAR(36) (???) | ||
224 | |||
225 | exec sp_rename 'inventoryitems.CreatorID', 'cr_old', 'COLUMN' | ||
226 | |||
227 | :GO | ||
228 | |||
229 | alter table inventoryitems | ||
230 | add creatorID varchar(36) NULL | ||
231 | |||
232 | :GO | ||
233 | |||
234 | update inventoryitems set creatorID = CONVERT(VARCHAR(36), cr_old) | ||
235 | |||
236 | alter table inventoryitems | ||
237 | drop column cr_old | ||
238 | |||
239 | COMMIT | ||
240 | |||
241 | :VERSION 8 | ||
242 | |||
243 | ALTER TABLE inventoryitems | ||
244 | ADD CONSTRAINT DF_inventoryitems_creatorID | ||
245 | DEFAULT '00000000-0000-0000-0000-000000000000' FOR creatorID | ||
246 | |||
247 | :GO | ||
248 | |||
249 | :VERSION 9 | ||
250 | |||
251 | BEGIN TRANSACTION | ||
252 | |||
253 | # CreatorID goes up to VARCHAR(255) | ||
254 | |||
255 | exec sp_rename 'inventoryitems.CreatorID', 'cr_old', 'COLUMN' | ||
256 | |||
257 | :GO | ||
258 | |||
259 | alter table inventoryitems | ||
260 | add creatorID varchar(255) NULL | ||
261 | |||
262 | :GO | ||
263 | |||
264 | update inventoryitems set creatorID = cr_old | ||
265 | |||
266 | alter table inventoryitems | ||
267 | drop CONSTRAINT DF_inventoryitems_creatorID | ||
268 | :GO | ||
269 | |||
270 | alter table inventoryitems | ||
271 | drop column cr_old | ||
272 | :GO | ||
273 | COMMIT | ||
274 | |||
275 | ALTER TABLE inventoryitems | ||
276 | ADD CONSTRAINT DF_inventoryitems_creatorID | ||
277 | DEFAULT '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 | |||
3 | BEGIN TRANSACTION | ||
4 | |||
5 | CREATE 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 | |||
19 | COMMIT | ||
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 | |||
3 | BEGIN TRANSACTION | ||
4 | |||
5 | CREATE 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 | |||
14 | COMMIT | ||
15 | |||
16 | :VERSION 2 | ||
17 | |||
18 | BEGIN TRANSACTION | ||
19 | |||
20 | CREATE UNIQUE INDEX SessionID ON Presence(SessionID); | ||
21 | CREATE INDEX UserID ON Presence(UserID); | ||
22 | |||
23 | COMMIT | ||
24 | |||
25 | :VERSION 2 | ||
26 | |||
27 | BEGIN TRANSACTION | ||
28 | |||
29 | ALTER TABLE Presence ADD LastSeen DateTime | ||
30 | |||
31 | COMMIT \ 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 | |||
3 | CREATE 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, | ||
50 | PRIMARY KEY CLUSTERED | ||
51 | ( | ||
52 | [UUID] ASC | ||
53 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
54 | ) ON [PRIMARY] | ||
55 | |||
56 | CREATE 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, | ||
84 | PRIMARY KEY CLUSTERED | ||
85 | ( | ||
86 | [UUID] ASC | ||
87 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
88 | ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] | ||
89 | |||
90 | CREATE 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, | ||
109 | PRIMARY KEY CLUSTERED | ||
110 | ( | ||
111 | [itemID] ASC | ||
112 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
113 | ) ON [PRIMARY] | ||
114 | |||
115 | CREATE 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 | |||
121 | CREATE 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, | ||
153 | PRIMARY KEY CLUSTERED | ||
154 | ( | ||
155 | [UUID] ASC | ||
156 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
157 | ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] | ||
158 | |||
159 | CREATE 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 | |||
167 | BEGIN TRANSACTION | ||
168 | |||
169 | CREATE 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 | |||
175 | create 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, | ||
210 | PRIMARY KEY CLUSTERED | ||
211 | ( | ||
212 | [regionUUID] ASC | ||
213 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
214 | ) ON [PRIMARY] | ||
215 | |||
216 | COMMIT | ||
217 | |||
218 | :VERSION 3 | ||
219 | |||
220 | BEGIN TRANSACTION | ||
221 | |||
222 | CREATE 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 | |||
272 | IF 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 | |||
276 | DROP TABLE dbo.prims | ||
277 | |||
278 | EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT' | ||
279 | |||
280 | ALTER 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 | |||
286 | COMMIT | ||
287 | |||
288 | :VERSION 4 | ||
289 | |||
290 | BEGIN TRANSACTION | ||
291 | |||
292 | CREATE 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 | |||
314 | IF 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 | |||
318 | DROP TABLE primitems | ||
319 | |||
320 | EXECUTE sp_rename N'Tmp_primitems', N'primitems', 'OBJECT' | ||
321 | |||
322 | ALTER 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 | |||
329 | COMMIT | ||
330 | |||
331 | |||
332 | :VERSION 5 | ||
333 | |||
334 | BEGIN TRANSACTION | ||
335 | |||
336 | CREATE 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 | |||
368 | IF 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 | |||
372 | DROP TABLE primshapes | ||
373 | |||
374 | EXECUTE sp_rename N'Tmp_primshapes', N'primshapes', 'OBJECT' | ||
375 | |||
376 | ALTER 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 | |||
382 | COMMIT | ||
383 | |||
384 | |||
385 | :VERSION 6 | ||
386 | |||
387 | BEGIN TRANSACTION | ||
388 | |||
389 | ALTER TABLE prims ADD PayPrice int not null default 0 | ||
390 | ALTER TABLE prims ADD PayButton1 int not null default 0 | ||
391 | ALTER TABLE prims ADD PayButton2 int not null default 0 | ||
392 | ALTER TABLE prims ADD PayButton3 int not null default 0 | ||
393 | ALTER TABLE prims ADD PayButton4 int not null default 0 | ||
394 | ALTER TABLE prims ADD LoopedSound varchar(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
395 | ALTER TABLE prims ADD LoopedSoundGain float not null default 0.0; | ||
396 | ALTER TABLE prims ADD TextureAnimation image | ||
397 | ALTER TABLE prims ADD OmegaX float not null default 0.0 | ||
398 | ALTER TABLE prims ADD OmegaY float not null default 0.0 | ||
399 | ALTER TABLE prims ADD OmegaZ float not null default 0.0 | ||
400 | ALTER TABLE prims ADD CameraEyeOffsetX float not null default 0.0 | ||
401 | ALTER TABLE prims ADD CameraEyeOffsetY float not null default 0.0 | ||
402 | ALTER TABLE prims ADD CameraEyeOffsetZ float not null default 0.0 | ||
403 | ALTER TABLE prims ADD CameraAtOffsetX float not null default 0.0 | ||
404 | ALTER TABLE prims ADD CameraAtOffsetY float not null default 0.0 | ||
405 | ALTER TABLE prims ADD CameraAtOffsetZ float not null default 0.0 | ||
406 | ALTER TABLE prims ADD ForceMouselook tinyint not null default 0 | ||
407 | ALTER TABLE prims ADD ScriptAccessPin int not null default 0 | ||
408 | ALTER TABLE prims ADD AllowedDrop tinyint not null default 0 | ||
409 | ALTER TABLE prims ADD DieAtEdge tinyint not null default 0 | ||
410 | ALTER TABLE prims ADD SalePrice int not null default 10 | ||
411 | ALTER TABLE prims ADD SaleType tinyint not null default 0 | ||
412 | |||
413 | ALTER TABLE primitems add flags integer not null default 0 | ||
414 | |||
415 | ALTER TABLE land ADD AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000' | ||
416 | |||
417 | CREATE index prims_regionuuid on prims(RegionUUID) | ||
418 | CREATE index prims_parentid on prims(ParentID) | ||
419 | |||
420 | CREATE index primitems_primid on primitems(primID) | ||
421 | |||
422 | COMMIT | ||
423 | |||
424 | |||
425 | :VERSION 7 | ||
426 | |||
427 | BEGIN TRANSACTION | ||
428 | |||
429 | ALTER TABLE prims ADD ColorR int not null default 0; | ||
430 | ALTER TABLE prims ADD ColorG int not null default 0; | ||
431 | ALTER TABLE prims ADD ColorB int not null default 0; | ||
432 | ALTER TABLE prims ADD ColorA int not null default 0; | ||
433 | ALTER TABLE prims ADD ParticleSystem IMAGE; | ||
434 | ALTER TABLE prims ADD ClickAction tinyint NOT NULL default 0; | ||
435 | |||
436 | COMMIT | ||
437 | |||
438 | |||
439 | :VERSION 8 | ||
440 | |||
441 | BEGIN TRANSACTION | ||
442 | |||
443 | ALTER TABLE land ADD OtherCleanTime integer NOT NULL default 0; | ||
444 | ALTER TABLE land ADD Dwell integer NOT NULL default 0; | ||
445 | |||
446 | COMMIT | ||
447 | |||
448 | :VERSION 9 | ||
449 | |||
450 | BEGIN TRANSACTION | ||
451 | |||
452 | ALTER TABLE prims ADD Material tinyint NOT NULL default 3 | ||
453 | |||
454 | COMMIT | ||
455 | |||
456 | |||
457 | :VERSION 10 | ||
458 | |||
459 | BEGIN TRANSACTION | ||
460 | |||
461 | ALTER TABLE regionsettings ADD sunvectorx float NOT NULL default 0; | ||
462 | ALTER TABLE regionsettings ADD sunvectory float NOT NULL default 0; | ||
463 | ALTER TABLE regionsettings ADD sunvectorz float NOT NULL default 0; | ||
464 | |||
465 | COMMIT | ||
466 | |||
467 | |||
468 | :VERSION 11 | ||
469 | |||
470 | BEGIN TRANSACTION | ||
471 | |||
472 | ALTER TABLE prims ADD CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000' | ||
473 | ALTER TABLE prims ADD CollisionSoundVolume float not null default 0.0 | ||
474 | |||
475 | COMMIT | ||
476 | |||
477 | |||
478 | :VERSION 12 | ||
479 | |||
480 | BEGIN TRANSACTION | ||
481 | |||
482 | ALTER TABLE prims ADD LinkNumber integer not null default 0 | ||
483 | |||
484 | COMMIT | ||
485 | |||
486 | |||
487 | :VERSION 13 | ||
488 | |||
489 | BEGIN TRANSACTION | ||
490 | |||
491 | CREATE 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 | |||
575 | IF 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 | |||
579 | DROP TABLE dbo.prims | ||
580 | |||
581 | EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT' | ||
582 | |||
583 | ALTER 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 | |||
590 | CREATE 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 | |||
595 | CREATE 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 | |||
600 | COMMIT | ||
601 | |||
602 | |||
603 | :VERSION 14 | ||
604 | |||
605 | BEGIN TRANSACTION | ||
606 | |||
607 | CREATE 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 | |||
639 | IF 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 | |||
643 | DROP TABLE dbo.primshapes | ||
644 | |||
645 | EXECUTE sp_rename N'dbo.Tmp_primshapes', N'primshapes', 'OBJECT' | ||
646 | |||
647 | ALTER 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 | |||
653 | COMMIT | ||
654 | |||
655 | |||
656 | :VERSION 15 | ||
657 | |||
658 | BEGIN TRANSACTION | ||
659 | |||
660 | CREATE 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 | |||
683 | IF 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 | |||
687 | DROP TABLE dbo.primitems | ||
688 | |||
689 | EXECUTE sp_rename N'dbo.Tmp_primitems', N'primitems', 'OBJECT' | ||
690 | |||
691 | ALTER 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 | |||
697 | CREATE 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 | |||
702 | COMMIT | ||
703 | |||
704 | |||
705 | :VERSION 16 | ||
706 | |||
707 | |||
708 | BEGIN TRANSACTION | ||
709 | |||
710 | CREATE 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 | |||
718 | IF 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 | |||
722 | DROP TABLE dbo.terrain | ||
723 | |||
724 | EXECUTE sp_rename N'dbo.Tmp_terrain', N'terrain', 'OBJECT' | ||
725 | |||
726 | COMMIT | ||
727 | |||
728 | |||
729 | :VERSION 17 | ||
730 | |||
731 | BEGIN TRANSACTION | ||
732 | |||
733 | CREATE 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 | |||
772 | IF 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 | |||
776 | DROP TABLE dbo.land | ||
777 | |||
778 | EXECUTE sp_rename N'dbo.Tmp_land', N'land', 'OBJECT' | ||
779 | |||
780 | ALTER 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 | |||
786 | COMMIT | ||
787 | |||
788 | |||
789 | |||
790 | :VERSION 18 | ||
791 | |||
792 | BEGIN TRANSACTION | ||
793 | |||
794 | CREATE TABLE dbo.Tmp_landaccesslist | ||
795 | ( | ||
796 | LandUUID uniqueidentifier NULL, | ||
797 | AccessUUID uniqueidentifier NULL, | ||
798 | Flags int NULL | ||
799 | ) ON [PRIMARY] | ||
800 | |||
801 | IF 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 | |||
805 | DROP TABLE dbo.landaccesslist | ||
806 | |||
807 | EXECUTE sp_rename N'dbo.Tmp_landaccesslist', N'landaccesslist', 'OBJECT' | ||
808 | |||
809 | COMMIT | ||
810 | |||
811 | |||
812 | |||
813 | :VERSION 19 | ||
814 | |||
815 | BEGIN TRANSACTION | ||
816 | |||
817 | CREATE 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 | |||
825 | IF 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 | |||
829 | DROP TABLE dbo.regionban | ||
830 | |||
831 | EXECUTE sp_rename N'dbo.Tmp_regionban', N'regionban', 'OBJECT' | ||
832 | |||
833 | COMMIT | ||
834 | |||
835 | |||
836 | :VERSION 20 | ||
837 | |||
838 | BEGIN TRANSACTION | ||
839 | |||
840 | CREATE 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 | |||
881 | IF 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 | |||
885 | DROP TABLE dbo.regionsettings | ||
886 | |||
887 | EXECUTE sp_rename N'dbo.Tmp_regionsettings', N'regionsettings', 'OBJECT' | ||
888 | |||
889 | ALTER 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 | |||
895 | COMMIT | ||
896 | |||
897 | |||
898 | :VERSION 21 | ||
899 | |||
900 | BEGIN TRANSACTION | ||
901 | |||
902 | ALTER TABLE prims ADD PassTouches bit not null default 0 | ||
903 | |||
904 | COMMIT | ||
905 | |||
906 | |||
907 | :VERSION 22 | ||
908 | |||
909 | BEGIN TRANSACTION | ||
910 | |||
911 | ALTER TABLE regionsettings ADD loaded_creation_date varchar(20) | ||
912 | ALTER TABLE regionsettings ADD loaded_creation_time varchar(20) | ||
913 | ALTER TABLE regionsettings ADD loaded_creation_id varchar(64) | ||
914 | |||
915 | COMMIT | ||
916 | |||
917 | :VERSION 23 | ||
918 | |||
919 | BEGIN TRANSACTION | ||
920 | |||
921 | ALTER TABLE regionsettings DROP COLUMN loaded_creation_date | ||
922 | ALTER TABLE regionsettings DROP COLUMN loaded_creation_time | ||
923 | ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0 | ||
924 | |||
925 | COMMIT | ||
926 | |||
927 | :VERSION 24 | ||
928 | |||
929 | BEGIN TRANSACTION | ||
930 | |||
931 | ALTER TABLE prims ADD MediaURL varchar(255) | ||
932 | ALTER TABLE primshapes ADD Media TEXT NULL | ||
933 | |||
934 | COMMIT | ||
935 | |||
936 | :VERSION 25 | ||
937 | |||
938 | BEGIN TRANSACTION | ||
939 | CREATE 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 | |||
1006 | COMMIT | ||
1007 | |||
1008 | :VERSION 26 | ||
1009 | |||
1010 | BEGIN TRANSACTION | ||
1011 | |||
1012 | ALTER TABLE regionsettings ADD map_tile_ID CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' | ||
1013 | |||
1014 | COMMIT | ||
1015 | |||
1016 | :VERSION 27 #--------------------- | ||
1017 | |||
1018 | BEGIN TRANSACTION | ||
1019 | ALTER TABLE land ADD MediaType VARCHAR(32) NOT NULL DEFAULT 'none/none' | ||
1020 | ALTER TABLE land ADD MediaDescription VARCHAR(255) NOT NULL DEFAULT '' | ||
1021 | ALTER TABLE land ADD MediaSize VARCHAR(16) NOT NULL DEFAULT '0,0' | ||
1022 | ALTER TABLE land ADD MediaLoop bit NOT NULL DEFAULT 0 | ||
1023 | ALTER TABLE land ADD ObscureMusic bit NOT NULL DEFAULT 0 | ||
1024 | ALTER TABLE land ADD ObscureMedia bit NOT NULL DEFAULT 0 | ||
1025 | COMMIT | ||
1026 | |||
1027 | :VERSION 28 #--------------------- | ||
1028 | |||
1029 | BEGIN TRANSACTION | ||
1030 | |||
1031 | ALTER TABLE prims | ||
1032 | ADD CONSTRAINT DF_prims_CreatorID | ||
1033 | DEFAULT '00000000-0000-0000-0000-000000000000' | ||
1034 | FOR CreatorID | ||
1035 | |||
1036 | ALTER TABLE prims ALTER COLUMN CreatorID uniqueidentifier NOT NULL | ||
1037 | |||
1038 | ALTER TABLE primitems | ||
1039 | ADD CONSTRAINT DF_primitems_CreatorID | ||
1040 | DEFAULT '00000000-0000-0000-0000-000000000000' | ||
1041 | FOR CreatorID | ||
1042 | |||
1043 | ALTER TABLE primitems ALTER COLUMN CreatorID uniqueidentifier NOT NULL | ||
1044 | |||
1045 | COMMIT | ||
1046 | |||
1047 | :VERSION 29 #----------------- Region Covenant changed time | ||
1048 | |||
1049 | BEGIN TRANSACTION | ||
1050 | |||
1051 | ALTER TABLE regionsettings ADD covenant_datetime int NOT NULL default 0 | ||
1052 | |||
1053 | COMMIT | ||
1054 | |||
1055 | :VERSION 30 #------------------Migrate creatorID storage to varchars instead of UUIDs for HG support | ||
1056 | |||
1057 | BEGIN TRANSACTION | ||
1058 | |||
1059 | EXECUTE sp_rename N'dbo.prims.creatorid', N'creatoridold', 'COLUMN' | ||
1060 | EXECUTE sp_rename N'dbo.primitems.creatorid', N'creatoridold', 'COLUMN' | ||
1061 | |||
1062 | COMMIT | ||
1063 | |||
1064 | :VERSION 31 #--------------------- | ||
1065 | |||
1066 | BEGIN TRANSACTION | ||
1067 | |||
1068 | ALTER TABLE prims ADD CreatorID varchar(255) | ||
1069 | ALTER TABLE primitems ADD CreatorID varchar(255) | ||
1070 | |||
1071 | COMMIT | ||
1072 | |||
1073 | :VERSION 32 #--------------------- | ||
1074 | |||
1075 | BEGIN TRANSACTION | ||
1076 | |||
1077 | UPDATE prims SET prims.CreatorID = CONVERT(varchar(255), creatoridold) | ||
1078 | UPDATE primitems SET primitems.CreatorID = CONVERT(varchar(255), creatoridold) | ||
1079 | |||
1080 | COMMIT | ||
1081 | |||
1082 | :VERSION 33 #--------------------- | ||
1083 | |||
1084 | BEGIN TRANSACTION | ||
1085 | |||
1086 | ALTER TABLE prims | ||
1087 | ADD CONSTRAINT DF_prims_CreatorIDNew | ||
1088 | DEFAULT '00000000-0000-0000-0000-000000000000' | ||
1089 | FOR CreatorID | ||
1090 | |||
1091 | ALTER TABLE prims ALTER COLUMN CreatorID varchar(255) NOT NULL | ||
1092 | |||
1093 | ALTER TABLE primitems | ||
1094 | ADD CONSTRAINT DF_primitems_CreatorIDNew | ||
1095 | DEFAULT '00000000-0000-0000-0000-000000000000' | ||
1096 | FOR CreatorID | ||
1097 | |||
1098 | ALTER TABLE primitems ALTER COLUMN CreatorID varchar(255) NOT NULL | ||
1099 | |||
1100 | COMMIT | ||
1101 | |||
1102 | :VERSION 34 #--------------- Telehub support | ||
1103 | |||
1104 | BEGIN TRANSACTION | ||
1105 | |||
1106 | CREATE 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 | |||
1117 | ALTER TABLE regionsettings ADD TelehubObject uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; | ||
1118 | |||
1119 | COMMIT | ||
1120 | |||
1121 | :VERSION 35 #---------------- Parcels for sale | ||
1122 | |||
1123 | BEGIN TRANSACTION | ||
1124 | |||
1125 | ALTER TABLE regionsettings ADD parcel_tile_ID uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; | ||
1126 | |||
1127 | COMMIT | ||
1128 | |||
1129 | :VERSION 36 #---------------- Timed bans/access | ||
1130 | |||
1131 | BEGIN TRANSACTION | ||
1132 | |||
1133 | ALTER TABLE landaccesslist ADD Expires integer NOT NULL DEFAULT 0; | ||
1134 | |||
1135 | COMMIT | ||
1136 | |||
1137 | :VERSION 37 #---------------- Environment Settings | ||
1138 | |||
1139 | BEGIN TRANSACTION | ||
1140 | |||
1141 | CREATE 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 | |||
1150 | COMMIT | ||
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 | |||
3 | CREATE 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 | |||
21 | BEGIN TRANSACTION | ||
22 | IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users]') AND type in (N'U')) | ||
23 | INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, | ||
24 | username AS FirstName, | ||
25 | lastname AS LastName, | ||
26 | email as Email, ( | ||
27 | 'AssetServerURI=' + | ||
28 | userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS ServiceURLs, | ||
29 | created as Created FROM users; | ||
30 | |||
31 | |||
32 | COMMIT | ||
33 | |||
34 | :VERSION 3 | ||
35 | |||
36 | BEGIN TRANSACTION | ||
37 | |||
38 | CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID); | ||
39 | CREATE INDEX Email ON UserAccounts(Email); | ||
40 | CREATE INDEX FirstName ON UserAccounts(FirstName); | ||
41 | CREATE INDEX LastName ON UserAccounts(LastName); | ||
42 | CREATE INDEX Name ON UserAccounts(FirstName,LastName); | ||
43 | |||
44 | COMMIT | ||
45 | |||
46 | :VERSION 4 | ||
47 | |||
48 | BEGIN TRANSACTION | ||
49 | |||
50 | ALTER TABLE UserAccounts ADD UserLevel integer NOT NULL DEFAULT 0; | ||
51 | ALTER TABLE UserAccounts ADD UserFlags integer NOT NULL DEFAULT 0; | ||
52 | ALTER TABLE UserAccounts ADD UserTitle varchar(64) NOT NULL DEFAULT ''; | ||
53 | |||
54 | COMMIT | ||
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 | |||
3 | CREATE 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 | |||
34 | CREATE 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 | |||
41 | CREATE 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 | |||
60 | CREATE 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 | |||
65 | CREATE 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 | |||
71 | CREATE 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 | |||
78 | CREATE 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 | |||
118 | BEGIN TRANSACTION | ||
119 | |||
120 | ALTER TABLE users ADD homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
121 | ALTER TABLE users ADD userFlags int NOT NULL default 0; | ||
122 | ALTER TABLE users ADD godLevel int NOT NULL default 0; | ||
123 | ALTER TABLE users ADD customType varchar(32) not null default ''; | ||
124 | ALTER TABLE users ADD partner varchar(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
125 | |||
126 | COMMIT | ||
127 | |||
128 | |||
129 | :VERSION 3 | ||
130 | |||
131 | BEGIN TRANSACTION | ||
132 | |||
133 | CREATE 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 | |||
139 | CREATE 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 | |||
145 | COMMIT | ||
146 | |||
147 | |||
148 | :VERSION 4 | ||
149 | |||
150 | BEGIN TRANSACTION | ||
151 | |||
152 | CREATE 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 | |||
160 | IF 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 | |||
164 | DROP TABLE dbo.userfriends | ||
165 | |||
166 | EXECUTE sp_rename N'Tmp_userfriends', N'userfriends', 'OBJECT' | ||
167 | |||
168 | CREATE 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 | |||
173 | CREATE 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 | |||
178 | COMMIT | ||
179 | |||
180 | |||
181 | :VERSION 5 | ||
182 | |||
183 | BEGIN TRANSACTION | ||
184 | |||
185 | ALTER TABLE users add email varchar(250); | ||
186 | |||
187 | COMMIT | ||
188 | |||
189 | |||
190 | :VERSION 6 | ||
191 | |||
192 | BEGIN TRANSACTION | ||
193 | |||
194 | CREATE 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 | |||
228 | IF 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 | |||
232 | DROP TABLE dbo.users | ||
233 | |||
234 | EXECUTE sp_rename N'dbo.Tmp_users', N'users', 'OBJECT' | ||
235 | |||
236 | ALTER 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 | |||
242 | CREATE 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 | |||
248 | COMMIT | ||
249 | |||
250 | |||
251 | :VERSION 7 | ||
252 | |||
253 | BEGIN TRANSACTION | ||
254 | |||
255 | CREATE 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 | |||
270 | IF 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 | |||
274 | DROP TABLE dbo.agents | ||
275 | |||
276 | EXECUTE sp_rename N'dbo.Tmp_agents', N'agents', 'OBJECT' | ||
277 | |||
278 | ALTER 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 | |||
284 | CREATE 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 | |||
289 | CREATE 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 | |||
294 | COMMIT | ||
295 | |||
296 | |||
297 | :VERSION 8 | ||
298 | |||
299 | BEGIN TRANSACTION | ||
300 | |||
301 | CREATE 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 | |||
309 | IF 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 | |||
313 | DROP TABLE dbo.userfriends | ||
314 | |||
315 | EXECUTE sp_rename N'dbo.Tmp_userfriends', N'userfriends', 'OBJECT' | ||
316 | |||
317 | CREATE 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 | |||
322 | CREATE 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 | |||
327 | COMMIT | ||
328 | |||
329 | |||
330 | :VERSION 9 | ||
331 | |||
332 | BEGIN TRANSACTION | ||
333 | |||
334 | CREATE 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 | |||
370 | IF 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 | |||
374 | DROP TABLE dbo.avatarappearance | ||
375 | |||
376 | EXECUTE sp_rename N'dbo.Tmp_avatarappearance', N'avatarappearance', 'OBJECT' | ||
377 | |||
378 | ALTER 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 | |||
384 | COMMIT | ||
385 | |||
386 | |||
387 | :VERSION 10 | ||
388 | |||
389 | BEGIN TRANSACTION | ||
390 | |||
391 | CREATE 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 | |||
399 | IF 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 | |||
403 | DROP TABLE dbo.avatarattachments | ||
404 | |||
405 | EXECUTE sp_rename N'dbo.Tmp_avatarattachments', N'avatarattachments', 'OBJECT' | ||
406 | |||
407 | CREATE 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 | |||
412 | COMMIT | ||
413 | |||
414 | |||
415 | :VERSION 11 | ||
416 | |||
417 | BEGIN TRANSACTION | ||
418 | |||
419 | ALTER TABLE users ADD scopeID uniqueidentifier not null default '00000000-0000-0000-0000-000000000000' | ||
420 | |||
421 | COMMIT | ||