aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/Resources/EstateStore.migrations
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources/EstateStore.migrations')
-rw-r--r--OpenSim/Data/MSSQL/Resources/EstateStore.migrations334
1 files changed, 334 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/EstateStore.migrations b/OpenSim/Data/MSSQL/Resources/EstateStore.migrations
new file mode 100644
index 0000000..64b2d2b
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/EstateStore.migrations
@@ -0,0 +1,334 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [dbo].[estate_managers](
6 [EstateID] [int] NOT NULL,
7 [uuid] [varchar](36) NOT NULL,
8 CONSTRAINT [PK_estate_managers] PRIMARY KEY CLUSTERED
9(
10 [EstateID] ASC
11)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
12) ON [PRIMARY];
13
14CREATE TABLE [dbo].[estate_groups](
15 [EstateID] [int] NOT NULL,
16 [uuid] [varchar](36) NOT NULL,
17 CONSTRAINT [PK_estate_groups] PRIMARY KEY CLUSTERED
18(
19 [EstateID] ASC
20)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
21) ON [PRIMARY];
22
23
24CREATE TABLE [dbo].[estate_users](
25 [EstateID] [int] NOT NULL,
26 [uuid] [varchar](36) NOT NULL,
27 CONSTRAINT [PK_estate_users] PRIMARY KEY CLUSTERED
28(
29 [EstateID] ASC
30)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
31) ON [PRIMARY];
32
33
34CREATE TABLE [dbo].[estateban](
35 [EstateID] [int] NOT NULL,
36 [bannedUUID] [varchar](36) NOT NULL,
37 [bannedIp] [varchar](16) NOT NULL,
38 [bannedIpHostMask] [varchar](16) NOT NULL,
39 [bannedNameMask] [varchar](64) NULL DEFAULT (NULL),
40 CONSTRAINT [PK_estateban] PRIMARY KEY CLUSTERED
41(
42 [EstateID] ASC
43)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
44) ON [PRIMARY];
45
46CREATE TABLE [dbo].[estate_settings](
47 [EstateID] [int] IDENTITY(1,100) NOT NULL,
48 [EstateName] [varchar](64) NULL DEFAULT (NULL),
49 [AbuseEmailToEstateOwner] [bit] NOT NULL,
50 [DenyAnonymous] [bit] NOT NULL,
51 [ResetHomeOnTeleport] [bit] NOT NULL,
52 [FixedSun] [bit] NOT NULL,
53 [DenyTransacted] [bit] NOT NULL,
54 [BlockDwell] [bit] NOT NULL,
55 [DenyIdentified] [bit] NOT NULL,
56 [AllowVoice] [bit] NOT NULL,
57 [UseGlobalTime] [bit] NOT NULL,
58 [PricePerMeter] [int] NOT NULL,
59 [TaxFree] [bit] NOT NULL,
60 [AllowDirectTeleport] [bit] NOT NULL,
61 [RedirectGridX] [int] NOT NULL,
62 [RedirectGridY] [int] NOT NULL,
63 [ParentEstateID] [int] NOT NULL,
64 [SunPosition] [float] NOT NULL,
65 [EstateSkipScripts] [bit] NOT NULL,
66 [BillableFactor] [float] NOT NULL,
67 [PublicAccess] [bit] NOT NULL,
68 [AbuseEmail] [varchar](255) NOT NULL,
69 [EstateOwner] [varchar](36) NOT NULL,
70 [DenyMinors] [bit] NOT NULL,
71 CONSTRAINT [PK_estate_settings] PRIMARY KEY CLUSTERED
72(
73 [EstateID] ASC
74)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
75) ON [PRIMARY];
76
77
78CREATE TABLE [dbo].[estate_map](
79 [RegionID] [varchar](36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
80 [EstateID] [int] NOT NULL,
81 CONSTRAINT [PK_estate_map] PRIMARY KEY CLUSTERED
82(
83 [RegionID] ASC
84)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
85) ON [PRIMARY];
86
87COMMIT
88
89:VERSION 2
90
91BEGIN TRANSACTION
92
93ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers
94
95CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
96 (
97 EstateID
98 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
99
100ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups
101
102CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
103 (
104 EstateID
105 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
106
107
108ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users
109
110CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
111 (
112 EstateID
113 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
114
115COMMIT
116
117
118:VERSION 3
119
120BEGIN TRANSACTION
121
122CREATE TABLE dbo.Tmp_estateban
123 (
124 EstateID int NOT NULL,
125 bannedUUID varchar(36) NOT NULL,
126 bannedIp varchar(16) NULL,
127 bannedIpHostMask varchar(16) NULL,
128 bannedNameMask varchar(64) NULL
129 ) ON [PRIMARY]
130
131IF EXISTS(SELECT * FROM dbo.estateban)
132 EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
133 SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban')
134
135DROP TABLE dbo.estateban
136
137EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
138
139CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
140 (
141 EstateID
142 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
143
144COMMIT
145
146
147:VERSION 4
148
149BEGIN TRANSACTION
150
151CREATE TABLE dbo.Tmp_estate_managers
152 (
153 EstateID int NOT NULL,
154 uuid uniqueidentifier NOT NULL
155 ) ON [PRIMARY]
156
157IF EXISTS(SELECT * FROM dbo.estate_managers)
158 EXEC('INSERT INTO dbo.Tmp_estate_managers (EstateID, uuid)
159 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_managers WITH (HOLDLOCK TABLOCKX)')
160
161DROP TABLE dbo.estate_managers
162
163EXECUTE sp_rename N'dbo.Tmp_estate_managers', N'estate_managers', 'OBJECT'
164
165CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
166 (
167 EstateID
168 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
169
170COMMIT
171
172
173:VERSION 5
174
175BEGIN TRANSACTION
176
177CREATE TABLE dbo.Tmp_estate_groups
178 (
179 EstateID int NOT NULL,
180 uuid uniqueidentifier NOT NULL
181 ) ON [PRIMARY]
182
183IF EXISTS(SELECT * FROM dbo.estate_groups)
184 EXEC('INSERT INTO dbo.Tmp_estate_groups (EstateID, uuid)
185 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_groups WITH (HOLDLOCK TABLOCKX)')
186
187DROP TABLE dbo.estate_groups
188
189EXECUTE sp_rename N'dbo.Tmp_estate_groups', N'estate_groups', 'OBJECT'
190
191CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
192 (
193 EstateID
194 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
195
196COMMIT
197
198
199:VERSION 6
200
201BEGIN TRANSACTION
202
203CREATE TABLE dbo.Tmp_estate_users
204 (
205 EstateID int NOT NULL,
206 uuid uniqueidentifier NOT NULL
207 ) ON [PRIMARY]
208
209IF EXISTS(SELECT * FROM dbo.estate_users)
210 EXEC('INSERT INTO dbo.Tmp_estate_users (EstateID, uuid)
211 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_users WITH (HOLDLOCK TABLOCKX)')
212
213DROP TABLE dbo.estate_users
214
215EXECUTE sp_rename N'dbo.Tmp_estate_users', N'estate_users', 'OBJECT'
216
217CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
218 (
219 EstateID
220 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
221
222COMMIT
223
224
225:VERSION 7
226
227BEGIN TRANSACTION
228
229CREATE TABLE dbo.Tmp_estateban
230 (
231 EstateID int NOT NULL,
232 bannedUUID uniqueidentifier NOT NULL,
233 bannedIp varchar(16) NULL,
234 bannedIpHostMask varchar(16) NULL,
235 bannedNameMask varchar(64) NULL
236 ) ON [PRIMARY]
237
238IF EXISTS(SELECT * FROM dbo.estateban)
239 EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
240 SELECT EstateID, CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban WITH (HOLDLOCK TABLOCKX)')
241
242DROP TABLE dbo.estateban
243
244EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
245
246CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
247 (
248 EstateID
249 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
250
251COMMIT
252
253
254:VERSION 8
255
256BEGIN TRANSACTION
257
258CREATE TABLE dbo.Tmp_estate_settings
259 (
260 EstateID int NOT NULL IDENTITY (1, 100),
261 EstateName varchar(64) NULL DEFAULT (NULL),
262 AbuseEmailToEstateOwner bit NOT NULL,
263 DenyAnonymous bit NOT NULL,
264 ResetHomeOnTeleport bit NOT NULL,
265 FixedSun bit NOT NULL,
266 DenyTransacted bit NOT NULL,
267 BlockDwell bit NOT NULL,
268 DenyIdentified bit NOT NULL,
269 AllowVoice bit NOT NULL,
270 UseGlobalTime bit NOT NULL,
271 PricePerMeter int NOT NULL,
272 TaxFree bit NOT NULL,
273 AllowDirectTeleport bit NOT NULL,
274 RedirectGridX int NOT NULL,
275 RedirectGridY int NOT NULL,
276 ParentEstateID int NOT NULL,
277 SunPosition float(53) NOT NULL,
278 EstateSkipScripts bit NOT NULL,
279 BillableFactor float(53) NOT NULL,
280 PublicAccess bit NOT NULL,
281 AbuseEmail varchar(255) NOT NULL,
282 EstateOwner uniqueidentifier NOT NULL,
283 DenyMinors bit NOT NULL
284 ) ON [PRIMARY]
285
286SET IDENTITY_INSERT dbo.Tmp_estate_settings ON
287
288IF EXISTS(SELECT * FROM dbo.estate_settings)
289 EXEC('INSERT INTO dbo.Tmp_estate_settings (EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, EstateOwner, DenyMinors)
290 SELECT EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, CONVERT(uniqueidentifier, EstateOwner), DenyMinors FROM dbo.estate_settings WITH (HOLDLOCK TABLOCKX)')
291
292SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF
293
294DROP TABLE dbo.estate_settings
295
296EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT'
297
298ALTER TABLE dbo.estate_settings ADD CONSTRAINT
299 PK_estate_settings PRIMARY KEY CLUSTERED
300 (
301 EstateID
302 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
303
304COMMIT
305
306
307:VERSION 9
308
309BEGIN TRANSACTION
310
311CREATE TABLE dbo.Tmp_estate_map
312 (
313 RegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
314 EstateID int NOT NULL
315 ) ON [PRIMARY]
316
317IF EXISTS(SELECT * FROM dbo.estate_map)
318 EXEC('INSERT INTO dbo.Tmp_estate_map (RegionID, EstateID)
319 SELECT CONVERT(uniqueidentifier, RegionID), EstateID FROM dbo.estate_map WITH (HOLDLOCK TABLOCKX)')
320
321DROP TABLE dbo.estate_map
322
323EXECUTE sp_rename N'dbo.Tmp_estate_map', N'estate_map', 'OBJECT'
324
325ALTER TABLE dbo.estate_map ADD CONSTRAINT
326 PK_estate_map PRIMARY KEY CLUSTERED
327 (
328 RegionID
329 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
330
331
332COMMIT
333
334