aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/Resources/GridStore.migrations
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MSSQL/Resources/GridStore.migrations225
1 files changed, 225 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/GridStore.migrations b/OpenSim/Data/MSSQL/Resources/GridStore.migrations
new file mode 100644
index 0000000..d2ca27a
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/GridStore.migrations
@@ -0,0 +1,225 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [dbo].[regions](
6 [regionHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
7 [regionName] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
8 [uuid] [varchar](255) COLLATE Latin1_General_CI_AS NOT NULL,
9 [regionRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
10 [regionSecret] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
11 [regionSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
12 [regionDataURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
13 [serverIP] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
14 [serverPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
15 [serverURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
16 [locX] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
17 [locY] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
18 [locZ] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
19 [eastOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
20 [westOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
21 [southOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
22 [northOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
23 [regionAssetURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
24 [regionAssetRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
25 [regionAssetSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
26 [regionUserURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
27 [regionUserRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
28 [regionUserSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
29 [regionMapTexture] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
30 [serverHttpPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
31 [serverRemotingPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
32 [owner_uuid] [varchar](36) COLLATE Latin1_General_CI_AS NULL,
33PRIMARY KEY CLUSTERED
34(
35 [uuid] ASC
36)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
37) ON [PRIMARY]
38
39COMMIT
40
41
42:VERSION 2
43
44BEGIN TRANSACTION
45
46CREATE TABLE Tmp_regions
47 (
48 uuid varchar(36) COLLATE Latin1_General_CI_AS NOT NULL,
49 regionHandle bigint NULL,
50 regionName varchar(20) NULL,
51 regionRecvKey varchar(128) NULL,
52 regionSendKey varchar(128) NULL,
53 regionSecret varchar(128) NULL,
54 regionDataURI varchar(128) NULL,
55 serverIP varchar(64) NULL,
56 serverPort int NULL,
57 serverURI varchar(255) NULL,
58 locX int NULL,
59 locY int NULL,
60 locZ int NULL,
61 eastOverrideHandle bigint NULL,
62 westOverrideHandle bigint NULL,
63 southOverrideHandle bigint NULL,
64 northOverrideHandle bigint NULL,
65 regionAssetURI varchar(255) NULL,
66 regionAssetRecvKey varchar(128) NULL,
67 regionAssetSendKey varchar(128) NULL,
68 regionUserURI varchar(255) NULL,
69 regionUserRecvKey varchar(128) NULL,
70 regionUserSendKey varchar(128) NULL,
71 regionMapTexture varchar(36) NULL,
72 serverHttpPort int NULL,
73 serverRemotingPort int NULL,
74 owner_uuid varchar(36) NULL,
75 originUUID varchar(36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000')
76 ) ON [PRIMARY]
77
78IF EXISTS(SELECT * FROM regions)
79 EXEC('INSERT INTO Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid)
80 SELECT CONVERT(varchar(36), uuid), CONVERT(bigint, regionHandle), CONVERT(varchar(20), regionName), CONVERT(varchar(128), regionRecvKey), CONVERT(varchar(128), regionSendKey), CONVERT(varchar(128), regionSecret), CONVERT(varchar(128), regionDataURI), CONVERT(varchar(64), serverIP), CONVERT(int, serverPort), serverURI, CONVERT(int, locX), CONVERT(int, locY), CONVERT(int, locZ), CONVERT(bigint, eastOverrideHandle), CONVERT(bigint, westOverrideHandle), CONVERT(bigint, southOverrideHandle), CONVERT(bigint, northOverrideHandle), regionAssetURI, CONVERT(varchar(128), regionAssetRecvKey), CONVERT(varchar(128), regionAssetSendKey), regionUserURI, CONVERT(varchar(128), regionUserRecvKey), CONVERT(varchar(128), regionUserSendKey), CONVERT(varchar(36), regionMapTexture), CONVERT(int, serverHttpPort), CONVERT(int, serverRemotingPort), owner_uuid FROM regions')
81
82DROP TABLE regions
83
84EXECUTE sp_rename N'Tmp_regions', N'regions', 'OBJECT'
85
86ALTER TABLE regions ADD CONSTRAINT
87 PK__regions__uuid PRIMARY KEY CLUSTERED
88 (
89 uuid
90 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
91
92COMMIT
93
94:VERSION 3
95
96BEGIN TRANSACTION
97
98CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
99 (
100 regionName
101 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
102
103CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions
104 (
105 regionHandle
106 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
107
108
109CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions
110 (
111 eastOverrideHandle,
112 westOverrideHandle,
113 southOverrideHandle,
114 northOverrideHandle
115 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
116
117COMMIT
118
119
120:VERSION 4
121
122/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
123BEGIN TRANSACTION
124
125CREATE TABLE dbo.Tmp_regions
126 (
127 uuid uniqueidentifier NOT NULL,
128 regionHandle bigint NULL,
129 regionName varchar(20) NULL,
130 regionRecvKey varchar(128) NULL,
131 regionSendKey varchar(128) NULL,
132 regionSecret varchar(128) NULL,
133 regionDataURI varchar(128) NULL,
134 serverIP varchar(64) NULL,
135 serverPort int NULL,
136 serverURI varchar(255) NULL,
137 locX int NULL,
138 locY int NULL,
139 locZ int NULL,
140 eastOverrideHandle bigint NULL,
141 westOverrideHandle bigint NULL,
142 southOverrideHandle bigint NULL,
143 northOverrideHandle bigint NULL,
144 regionAssetURI varchar(255) NULL,
145 regionAssetRecvKey varchar(128) NULL,
146 regionAssetSendKey varchar(128) NULL,
147 regionUserURI varchar(255) NULL,
148 regionUserRecvKey varchar(128) NULL,
149 regionUserSendKey varchar(128) NULL,
150 regionMapTexture uniqueidentifier NULL,
151 serverHttpPort int NULL,
152 serverRemotingPort int NULL,
153 owner_uuid uniqueidentifier NOT NULL,
154 originUUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000')
155 ) ON [PRIMARY]
156
157IF EXISTS(SELECT * FROM dbo.regions)
158 EXEC('INSERT INTO dbo.Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid, originUUID)
159 SELECT CONVERT(uniqueidentifier, uuid), regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, CONVERT(uniqueidentifier, regionMapTexture), serverHttpPort, serverRemotingPort, CONVERT(uniqueidentifier, owner_uuid), CONVERT(uniqueidentifier, originUUID) FROM dbo.regions WITH (HOLDLOCK TABLOCKX)')
160
161DROP TABLE dbo.regions
162
163EXECUTE sp_rename N'dbo.Tmp_regions', N'regions', 'OBJECT'
164
165ALTER TABLE dbo.regions ADD CONSTRAINT
166 PK__regions__uuid PRIMARY KEY CLUSTERED
167 (
168 uuid
169 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
170
171CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
172 (
173 regionName
174 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
175
176CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions
177 (
178 regionHandle
179 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
180
181CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions
182 (
183 eastOverrideHandle,
184 westOverrideHandle,
185 southOverrideHandle,
186 northOverrideHandle
187 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
188
189COMMIT
190
191
192:VERSION 5
193
194BEGIN TRANSACTION
195
196ALTER TABLE regions ADD access int default 0;
197
198COMMIT
199
200
201:VERSION 6
202
203BEGIN TRANSACTION
204
205ALTER TABLE regions ADD scopeid uniqueidentifier default '00000000-0000-0000-0000-000000000000';
206ALTER TABLE regions ADD DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [owner_uuid];
207ALTER TABLE regions ADD sizeX integer not null default 0;
208ALTER TABLE regions ADD sizeY integer not null default 0;
209
210COMMIT
211
212
213:VERSION 7
214
215BEGIN TRANSACTION
216
217ALTER TABLE regions ADD [flags] integer NOT NULL DEFAULT 0;
218CREATE INDEX [flags] ON regions(flags);
219ALTER TABLE [regions] ADD [last_seen] integer NOT NULL DEFAULT 0;
220ALTER TABLE [regions] ADD [PrincipalID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
221ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0;
222
223COMMIT
224
225