diff options
author | Melanie Thielker | 2008-09-14 13:23:02 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-14 13:23:02 +0000 |
commit | 281955949910eb257b5f7e42e54535ba7812418e (patch) | |
tree | 8c62c0006f2567983a686e811513c8c009061aac /OpenSim/Data/MSSQL/Resources | |
parent | * Converted a number of methods within the login processes from private to pr... (diff) | |
download | opensim-SC_OLD-281955949910eb257b5f7e42e54535ba7812418e.zip opensim-SC_OLD-281955949910eb257b5f7e42e54535ba7812418e.tar.gz opensim-SC_OLD-281955949910eb257b5f7e42e54535ba7812418e.tar.bz2 opensim-SC_OLD-281955949910eb257b5f7e42e54535ba7812418e.tar.xz |
Mantis #2124
Thank you, RuudL, for a patch that brings MSSQL up to the same
implementation level as MySQL.
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources')
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/001_AssetStore.sql | 13 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/001_GridStore.sql | 37 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql | 64 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/001_UserStore.sql | 224 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/002_AssetStore.sql | 29 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/002_UserStore.sql | 18 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/003_GridStore.sql | 22 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/003_UserStore.sql | 30 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/004_RegionStore.sql | 12 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/004_UserStore.sql | 58 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/005_RegionStore.sql | 16 |
11 files changed, 509 insertions, 14 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/001_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/001_AssetStore.sql new file mode 100644 index 0000000..2b293c7 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/001_AssetStore.sql | |||
@@ -0,0 +1,13 @@ | |||
1 | CREATE TABLE [assets] ( | ||
2 | [id] [varchar](36) NOT NULL, | ||
3 | [name] [varchar](64) NOT NULL, | ||
4 | [description] [varchar](64) NOT NULL, | ||
5 | [assetType] [tinyint] NOT NULL, | ||
6 | [local] [tinyint] NOT NULL, | ||
7 | [temporary] [tinyint] NOT NULL, | ||
8 | [data] [image] NOT NULL, | ||
9 | PRIMARY KEY CLUSTERED | ||
10 | ( | ||
11 | [id] 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] | ||
diff --git a/OpenSim/Data/MSSQL/Resources/001_GridStore.sql b/OpenSim/Data/MSSQL/Resources/001_GridStore.sql new file mode 100644 index 0000000..ff15f54 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/001_GridStore.sql | |||
@@ -0,0 +1,37 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE [dbo].[regions]( | ||
4 | [regionHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
5 | [regionName] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
6 | [uuid] [varchar](255) COLLATE Latin1_General_CI_AS NOT NULL, | ||
7 | [regionRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
8 | [regionSecret] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
9 | [regionSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
10 | [regionDataURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
11 | [serverIP] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
12 | [serverPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
13 | [serverURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
14 | [locX] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
15 | [locY] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
16 | [locZ] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
17 | [eastOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
18 | [westOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
19 | [southOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
20 | [northOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
21 | [regionAssetURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
22 | [regionAssetRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
23 | [regionAssetSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
24 | [regionUserURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
25 | [regionUserRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
26 | [regionUserSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
27 | [regionMapTexture] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
28 | [serverHttpPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
29 | [serverRemotingPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
30 | [owner_uuid] [varchar](36) COLLATE Latin1_General_CI_AS NULL, | ||
31 | PRIMARY KEY CLUSTERED | ||
32 | ( | ||
33 | [uuid] ASC | ||
34 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
35 | ) ON [PRIMARY] | ||
36 | |||
37 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql new file mode 100644 index 0000000..836d2d1 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql | |||
@@ -0,0 +1,64 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE [inventoryfolders] ( | ||
4 | [folderID] [varchar](36) NOT NULL default '', | ||
5 | [agentID] [varchar](36) default NULL, | ||
6 | [parentFolderID] [varchar](36) default NULL, | ||
7 | [folderName] [varchar](64) default NULL, | ||
8 | [type] [smallint] NOT NULL default 0, | ||
9 | [version] [int] NOT NULL default 0, | ||
10 | PRIMARY KEY CLUSTERED | ||
11 | ( | ||
12 | [folderID] ASC | ||
13 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
14 | ) ON [PRIMARY] | ||
15 | |||
16 | CREATE NONCLUSTERED INDEX [owner] ON [inventoryfolders] | ||
17 | ( | ||
18 | [agentID] ASC | ||
19 | )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] | ||
20 | |||
21 | CREATE NONCLUSTERED INDEX [parent] ON [inventoryfolders] | ||
22 | ( | ||
23 | [parentFolderID] ASC | ||
24 | )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] | ||
25 | |||
26 | |||
27 | CREATE TABLE [inventoryitems] ( | ||
28 | [inventoryID] [varchar](36) NOT NULL default '', | ||
29 | [assetID] [varchar](36) default NULL, | ||
30 | [assetType] [int] default NULL, | ||
31 | [parentFolderID] [varchar](36) default NULL, | ||
32 | [avatarID] [varchar](36) default NULL, | ||
33 | [inventoryName] [varchar](64) default NULL, | ||
34 | [inventoryDescription] [varchar](128) default NULL, | ||
35 | [inventoryNextPermissions] [int] default NULL, | ||
36 | [inventoryCurrentPermissions] [int] default NULL, | ||
37 | [invType] [int] default NULL, | ||
38 | [creatorID] [varchar](36) default NULL, | ||
39 | [inventoryBasePermissions] [int] NOT NULL default 0, | ||
40 | [inventoryEveryOnePermissions] [int] NOT NULL default 0, | ||
41 | [salePrice] [int] default NULL, | ||
42 | [saleType] [tinyint] default NULL, | ||
43 | [creationDate] [int] default NULL, | ||
44 | [groupID] [varchar](36) default NULL, | ||
45 | [groupOwned] [bit] default NULL, | ||
46 | [flags] [int] default NULL, | ||
47 | PRIMARY KEY CLUSTERED | ||
48 | ( | ||
49 | [inventoryID] ASC | ||
50 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
51 | ) ON [PRIMARY] | ||
52 | |||
53 | |||
54 | CREATE NONCLUSTERED INDEX [owner] ON [inventoryitems] | ||
55 | ( | ||
56 | [avatarID] ASC | ||
57 | )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] | ||
58 | |||
59 | CREATE NONCLUSTERED INDEX [folder] ON [inventoryitems] | ||
60 | ( | ||
61 | [parentFolderID] ASC | ||
62 | )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] | ||
63 | |||
64 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/001_UserStore.sql b/OpenSim/Data/MSSQL/Resources/001_UserStore.sql new file mode 100644 index 0000000..abd6ff2 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/001_UserStore.sql | |||
@@ -0,0 +1,224 @@ | |||
1 | CREATE TABLE [users] ( | ||
2 | [UUID] [varchar](36) NOT NULL default '', | ||
3 | [username] [varchar](32) NOT NULL, | ||
4 | [lastname] [varchar](32) NOT NULL, | ||
5 | [passwordHash] [varchar](32) NOT NULL, | ||
6 | [passwordSalt] [varchar](32) NOT NULL, | ||
7 | [homeRegion] [bigint] default NULL, | ||
8 | [homeLocationX] [float] default NULL, | ||
9 | [homeLocationY] [float] default NULL, | ||
10 | [homeLocationZ] [float] default NULL, | ||
11 | [homeLookAtX] [float] default NULL, | ||
12 | [homeLookAtY] [float] default NULL, | ||
13 | [homeLookAtZ] [float] default NULL, | ||
14 | [created] [int] NOT NULL, | ||
15 | [lastLogin] [int] NOT NULL, | ||
16 | [userInventoryURI] [varchar](255) default NULL, | ||
17 | [userAssetURI] [varchar](255) default NULL, | ||
18 | [profileCanDoMask] [int] default NULL, | ||
19 | [profileWantDoMask] [int] default NULL, | ||
20 | [profileAboutText] [ntext], | ||
21 | [profileFirstText] [ntext], | ||
22 | [profileImage] [varchar](36) default NULL, | ||
23 | [profileFirstImage] [varchar](36) default NULL, | ||
24 | [webLoginKey] [varchar](36) default NULL, | ||
25 | PRIMARY KEY CLUSTERED | ||
26 | ( | ||
27 | [UUID] ASC | ||
28 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
29 | ) ON [PRIMARY] | ||
30 | |||
31 | |||
32 | CREATE NONCLUSTERED INDEX [usernames] ON [users] | ||
33 | ( | ||
34 | [username] ASC, | ||
35 | [lastname] ASC | ||
36 | )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] | ||
37 | |||
38 | |||
39 | CREATE TABLE [agents] ( | ||
40 | [UUID] [varchar](36) NOT NULL, | ||
41 | [sessionID] [varchar](36) NOT NULL, | ||
42 | [secureSessionID] [varchar](36) NOT NULL, | ||
43 | [agentIP] [varchar](16) NOT NULL, | ||
44 | [agentPort] [int] NOT NULL, | ||
45 | [agentOnline] [tinyint] NOT NULL, | ||
46 | [loginTime] [int] NOT NULL, | ||
47 | [logoutTime] [int] NOT NULL, | ||
48 | [currentRegion] [varchar](36) NOT NULL, | ||
49 | [currentHandle] [bigint] NOT NULL, | ||
50 | [currentPos] [varchar](64) NOT NULL, | ||
51 | PRIMARY KEY CLUSTERED | ||
52 | ( | ||
53 | [UUID] ASC | ||
54 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
55 | ) ON [PRIMARY] | ||
56 | |||
57 | |||
58 | CREATE NONCLUSTERED INDEX [session] ON [agents] | ||
59 | ( | ||
60 | [sessionID] ASC | ||
61 | )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] | ||
62 | |||
63 | CREATE NONCLUSTERED INDEX [ssession] ON [agents] | ||
64 | ( | ||
65 | [secureSessionID] ASC | ||
66 | )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] | ||
67 | |||
68 | |||
69 | CREATE TABLE [dbo].[userfriends]( | ||
70 | [ownerID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL, | ||
71 | [friendID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL, | ||
72 | [friendPerms] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, | ||
73 | [datetimestamp] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL | ||
74 | ) ON [PRIMARY] | ||
75 | |||
76 | CREATE TABLE [avatarappearance] ( | ||
77 | [Owner] [varchar](36) NOT NULL, | ||
78 | [Serial] int NOT NULL, | ||
79 | [Visual_Params] [image] NOT NULL, | ||
80 | [Texture] [image] NOT NULL, | ||
81 | [Avatar_Height] float NOT NULL, | ||
82 | [Body_Item] [varchar](36) NOT NULL, | ||
83 | [Body_Asset] [varchar](36) NOT NULL, | ||
84 | [Skin_Item] [varchar](36) NOT NULL, | ||
85 | [Skin_Asset] [varchar](36) NOT NULL, | ||
86 | [Hair_Item] [varchar](36) NOT NULL, | ||
87 | [Hair_Asset] [varchar](36) NOT NULL, | ||
88 | [Eyes_Item] [varchar](36) NOT NULL, | ||
89 | [Eyes_Asset] [varchar](36) NOT NULL, | ||
90 | [Shirt_Item] [varchar](36) NOT NULL, | ||
91 | [Shirt_Asset] [varchar](36) NOT NULL, | ||
92 | [Pants_Item] [varchar](36) NOT NULL, | ||
93 | [Pants_Asset] [varchar](36) NOT NULL, | ||
94 | [Shoes_Item] [varchar](36) NOT NULL, | ||
95 | [Shoes_Asset] [varchar](36) NOT NULL, | ||
96 | [Socks_Item] [varchar](36) NOT NULL, | ||
97 | [Socks_Asset] [varchar](36) NOT NULL, | ||
98 | [Jacket_Item] [varchar](36) NOT NULL, | ||
99 | [Jacket_Asset] [varchar](36) NOT NULL, | ||
100 | [Gloves_Item] [varchar](36) NOT NULL, | ||
101 | [Gloves_Asset] [varchar](36) NOT NULL, | ||
102 | [Undershirt_Item] [varchar](36) NOT NULL, | ||
103 | [Undershirt_Asset] [varchar](36) NOT NULL, | ||
104 | [Underpants_Item] [varchar](36) NOT NULL, | ||
105 | [Underpants_Asset] [varchar](36) NOT NULL, | ||
106 | [Skirt_Item] [varchar](36) NOT NULL, | ||
107 | [Skirt_Asset] [varchar](36) NOT NULL, | ||
108 | |||
109 | PRIMARY KEY CLUSTERED ( | ||
110 | [Owner] | ||
111 | ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
112 | ) ON [PRIMARY] | ||
113 | CREATE TABLE [users] ( | ||
114 | [UUID] [varchar](36) NOT NULL default '', | ||
115 | [username] [varchar](32) NOT NULL, | ||
116 | [lastname] [varchar](32) NOT NULL, | ||
117 | [passwordHash] [varchar](32) NOT NULL, | ||
118 | [passwordSalt] [varchar](32) NOT NULL, | ||
119 | [homeRegion] [bigint] default NULL, | ||
120 | [homeLocationX] [float] default NULL, | ||
121 | [homeLocationY] [float] default NULL, | ||
122 | [homeLocationZ] [float] default NULL, | ||
123 | [homeLookAtX] [float] default NULL, | ||
124 | [homeLookAtY] [float] default NULL, | ||
125 | [homeLookAtZ] [float] default NULL, | ||
126 | [created] [int] NOT NULL, | ||
127 | [lastLogin] [int] NOT NULL, | ||
128 | [userInventoryURI] [varchar](255) default NULL, | ||
129 | [userAssetURI] [varchar](255) default NULL, | ||
130 | [profileCanDoMask] [int] default NULL, | ||
131 | [profileWantDoMask] [int] default NULL, | ||
132 | [profileAboutText] [ntext], | ||
133 | [profileFirstText] [ntext], | ||
134 | [profileImage] [varchar](36) default NULL, | ||
135 | [profileFirstImage] [varchar](36) default NULL, | ||
136 | [webLoginKey] [varchar](36) default NULL, | ||
137 | PRIMARY KEY CLUSTERED | ||
138 | ( | ||
139 | [UUID] ASC | ||
140 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
141 | ) ON [PRIMARY] | ||
142 | |||
143 | |||
144 | CREATE NONCLUSTERED INDEX [usernames] ON [users] | ||
145 | ( | ||
146 | [username] ASC, | ||
147 | [lastname] ASC | ||
148 | )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] | ||
149 | |||
150 | |||
151 | CREATE TABLE [agents] ( | ||
152 | [UUID] [varchar](36) NOT NULL, | ||
153 | [sessionID] [varchar](36) NOT NULL, | ||
154 | [secureSessionID] [varchar](36) NOT NULL, | ||
155 | [agentIP] [varchar](16) NOT NULL, | ||
156 | [agentPort] [int] NOT NULL, | ||
157 | [agentOnline] [tinyint] NOT NULL, | ||
158 | [loginTime] [int] NOT NULL, | ||
159 | [logoutTime] [int] NOT NULL, | ||
160 | [currentRegion] [varchar](36) NOT NULL, | ||
161 | [currentHandle] [bigint] NOT NULL, | ||
162 | [currentPos] [varchar](64) NOT NULL, | ||
163 | PRIMARY KEY CLUSTERED | ||
164 | ( | ||
165 | [UUID] ASC | ||
166 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
167 | ) ON [PRIMARY] | ||
168 | |||
169 | |||
170 | CREATE NONCLUSTERED INDEX [session] ON [agents] | ||
171 | ( | ||
172 | [sessionID] ASC | ||
173 | )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] | ||
174 | |||
175 | CREATE NONCLUSTERED INDEX [ssession] ON [agents] | ||
176 | ( | ||
177 | [secureSessionID] ASC | ||
178 | )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] | ||
179 | |||
180 | |||
181 | CREATE TABLE [dbo].[userfriends]( | ||
182 | [ownerID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL, | ||
183 | [friendID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL, | ||
184 | [friendPerms] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, | ||
185 | [datetimestamp] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL | ||
186 | ) ON [PRIMARY] | ||
187 | |||
188 | CREATE TABLE [avatarappearance] ( | ||
189 | [Owner] [varchar](36) NOT NULL, | ||
190 | [Serial] int NOT NULL, | ||
191 | [Visual_Params] [image] NOT NULL, | ||
192 | [Texture] [image] NOT NULL, | ||
193 | [Avatar_Height] float NOT NULL, | ||
194 | [Body_Item] [varchar](36) NOT NULL, | ||
195 | [Body_Asset] [varchar](36) NOT NULL, | ||
196 | [Skin_Item] [varchar](36) NOT NULL, | ||
197 | [Skin_Asset] [varchar](36) NOT NULL, | ||
198 | [Hair_Item] [varchar](36) NOT NULL, | ||
199 | [Hair_Asset] [varchar](36) NOT NULL, | ||
200 | [Eyes_Item] [varchar](36) NOT NULL, | ||
201 | [Eyes_Asset] [varchar](36) NOT NULL, | ||
202 | [Shirt_Item] [varchar](36) NOT NULL, | ||
203 | [Shirt_Asset] [varchar](36) NOT NULL, | ||
204 | [Pants_Item] [varchar](36) NOT NULL, | ||
205 | [Pants_Asset] [varchar](36) NOT NULL, | ||
206 | [Shoes_Item] [varchar](36) NOT NULL, | ||
207 | [Shoes_Asset] [varchar](36) NOT NULL, | ||
208 | [Socks_Item] [varchar](36) NOT NULL, | ||
209 | [Socks_Asset] [varchar](36) NOT NULL, | ||
210 | [Jacket_Item] [varchar](36) NOT NULL, | ||
211 | [Jacket_Asset] [varchar](36) NOT NULL, | ||
212 | [Gloves_Item] [varchar](36) NOT NULL, | ||
213 | [Gloves_Asset] [varchar](36) NOT NULL, | ||
214 | [Undershirt_Item] [varchar](36) NOT NULL, | ||
215 | [Undershirt_Asset] [varchar](36) NOT NULL, | ||
216 | [Underpants_Item] [varchar](36) NOT NULL, | ||
217 | [Underpants_Asset] [varchar](36) NOT NULL, | ||
218 | [Skirt_Item] [varchar](36) NOT NULL, | ||
219 | [Skirt_Asset] [varchar](36) NOT NULL, | ||
220 | |||
221 | PRIMARY KEY CLUSTERED ( | ||
222 | [Owner] | ||
223 | ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
224 | ) ON [PRIMARY] | ||
diff --git a/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql new file mode 100644 index 0000000..3e24543 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql | |||
@@ -0,0 +1,29 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE Tmp_assets | ||
4 | ( | ||
5 | id varchar(36) NOT NULL, | ||
6 | name varchar(64) NOT NULL, | ||
7 | description varchar(64) NOT NULL, | ||
8 | assetType tinyint NOT NULL, | ||
9 | local bit NOT NULL, | ||
10 | temporary bit NOT NULL, | ||
11 | data image NOT NULL | ||
12 | ) ON [PRIMARY] | ||
13 | TEXTIMAGE_ON [PRIMARY] | ||
14 | |||
15 | IF EXISTS(SELECT * FROM assets) | ||
16 | EXEC('INSERT INTO Tmp_assets (id, name, description, assetType, local, temporary, data) | ||
17 | SELECT id, name, description, assetType, CONVERT(bit, local), CONVERT(bit, temporary), data FROM assets WITH (HOLDLOCK TABLOCKX)') | ||
18 | |||
19 | DROP TABLE assets | ||
20 | |||
21 | EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT' | ||
22 | |||
23 | ALTER TABLE dbo.assets ADD CONSTRAINT | ||
24 | PK__assets__id PRIMARY KEY CLUSTERED | ||
25 | ( | ||
26 | id | ||
27 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
28 | |||
29 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/002_UserStore.sql b/OpenSim/Data/MSSQL/Resources/002_UserStore.sql new file mode 100644 index 0000000..a3b5868 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/002_UserStore.sql | |||
@@ -0,0 +1,18 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE users ADD homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
4 | ALTER TABLE users ADD userFlags int NOT NULL default 0; | ||
5 | ALTER TABLE users ADD godLevel int NOT NULL default 0; | ||
6 | ALTER TABLE users ADD customType varchar(32) not null default ''; | ||
7 | ALTER TABLE users ADD partner varchar(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
8 | |||
9 | COMMIT | ||
10 | BEGIN TRANSACTION | ||
11 | |||
12 | ALTER TABLE users ADD homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
13 | ALTER TABLE users ADD userFlags int NOT NULL default 0; | ||
14 | ALTER TABLE users ADD godLevel int NOT NULL default 0; | ||
15 | ALTER TABLE users ADD customType varchar(32) not null default ''; | ||
16 | ALTER TABLE users ADD partner varchar(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
17 | |||
18 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/003_GridStore.sql b/OpenSim/Data/MSSQL/Resources/003_GridStore.sql new file mode 100644 index 0000000..e080947 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/003_GridStore.sql | |||
@@ -0,0 +1,22 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions | ||
4 | ( | ||
5 | regionName | ||
6 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
7 | |||
8 | CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions | ||
9 | ( | ||
10 | regionHandle | ||
11 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
12 | |||
13 | |||
14 | CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions | ||
15 | ( | ||
16 | eastOverrideHandle, | ||
17 | westOverrideHandle, | ||
18 | southOverrideHandle, | ||
19 | northOverrideHandle | ||
20 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
21 | |||
22 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/003_UserStore.sql b/OpenSim/Data/MSSQL/Resources/003_UserStore.sql new file mode 100644 index 0000000..c2821e6 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/003_UserStore.sql | |||
@@ -0,0 +1,30 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE [avatarattachments] ( | ||
4 | [UUID] varchar(36) NOT NULL | ||
5 | , [attachpoint] int NOT NULL | ||
6 | , [item] varchar(36) NOT NULL | ||
7 | , [asset] varchar(36) NOT NULL) | ||
8 | |||
9 | CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments | ||
10 | ( | ||
11 | UUID | ||
12 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
13 | |||
14 | |||
15 | COMMIT | ||
16 | BEGIN TRANSACTION | ||
17 | |||
18 | CREATE TABLE [avatarattachments] ( | ||
19 | [UUID] varchar(36) NOT NULL | ||
20 | , [attachpoint] int NOT NULL | ||
21 | , [item] varchar(36) NOT NULL | ||
22 | , [asset] varchar(36) NOT NULL) | ||
23 | |||
24 | CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments | ||
25 | ( | ||
26 | UUID | ||
27 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
28 | |||
29 | |||
30 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/004_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/004_RegionStore.sql index 4e64901..15b39a7 100644 --- a/OpenSim/Data/MSSQL/Resources/004_RegionStore.sql +++ b/OpenSim/Data/MSSQL/Resources/004_RegionStore.sql | |||
@@ -1,6 +1,6 @@ | |||
1 | BEGIN TRANSACTION | 1 | BEGIN TRANSACTION |
2 | 2 | ||
3 | CREATE TABLE dbo.Tmp_primitems | 3 | CREATE TABLE Tmp_primitems |
4 | ( | 4 | ( |
5 | itemID varchar(36) NOT NULL, | 5 | itemID varchar(36) NOT NULL, |
6 | primID varchar(36) NULL, | 6 | primID varchar(36) NULL, |
@@ -22,15 +22,15 @@ CREATE TABLE dbo.Tmp_primitems | |||
22 | groupPermissions int NULL | 22 | groupPermissions int NULL |
23 | ) ON [PRIMARY] | 23 | ) ON [PRIMARY] |
24 | 24 | ||
25 | IF EXISTS(SELECT * FROM dbo.primitems) | 25 | IF EXISTS(SELECT * FROM primitems) |
26 | EXEC('INSERT INTO dbo.Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions) | 26 | EXEC('INSERT INTO Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions) |
27 | 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') | 27 | 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') |
28 | 28 | ||
29 | DROP TABLE dbo.primitems | 29 | DROP TABLE primitems |
30 | 30 | ||
31 | EXECUTE sp_rename N'dbo.Tmp_primitems', N'primitems', 'OBJECT' | 31 | EXECUTE sp_rename N'Tmp_primitems', N'primitems', 'OBJECT' |
32 | 32 | ||
33 | ALTER TABLE dbo.primitems ADD CONSTRAINT | 33 | ALTER TABLE primitems ADD CONSTRAINT |
34 | PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED | 34 | PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED |
35 | ( | 35 | ( |
36 | itemID | 36 | itemID |
diff --git a/OpenSim/Data/MSSQL/Resources/004_UserStore.sql b/OpenSim/Data/MSSQL/Resources/004_UserStore.sql new file mode 100644 index 0000000..f3e223e --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/004_UserStore.sql | |||
@@ -0,0 +1,58 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE Tmp_userfriends | ||
4 | ( | ||
5 | ownerID varchar(36) NOT NULL, | ||
6 | friendID varchar(36) NOT NULL, | ||
7 | friendPerms int NOT NULL, | ||
8 | datetimestamp int NOT NULL | ||
9 | ) ON [PRIMARY] | ||
10 | |||
11 | IF EXISTS(SELECT * FROM userfriends) | ||
12 | EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp) | ||
13 | SELECT CONVERT(varchar(36), ownerID), CONVERT(varchar(36), friendID), CONVERT(int, friendPerms), CONVERT(int, datetimestamp) FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)') | ||
14 | |||
15 | DROP TABLE dbo.userfriends | ||
16 | |||
17 | EXECUTE sp_rename N'Tmp_userfriends', N'userfriends', 'OBJECT' | ||
18 | |||
19 | CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON userfriends | ||
20 | ( | ||
21 | ownerID | ||
22 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
23 | |||
24 | CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON userfriends | ||
25 | ( | ||
26 | friendID | ||
27 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
28 | |||
29 | COMMIT | ||
30 | BEGIN TRANSACTION | ||
31 | |||
32 | CREATE TABLE Tmp_userfriends | ||
33 | ( | ||
34 | ownerID varchar(36) NOT NULL, | ||
35 | friendID varchar(36) NOT NULL, | ||
36 | friendPerms int NOT NULL, | ||
37 | datetimestamp int NOT NULL | ||
38 | ) ON [PRIMARY] | ||
39 | |||
40 | IF EXISTS(SELECT * FROM dbo.userfriends) | ||
41 | EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp) | ||
42 | SELECT CONVERT(varchar(36), ownerID), CONVERT(varchar(36), friendID), CONVERT(int, friendPerms), CONVERT(int, datetimestamp) FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)') | ||
43 | |||
44 | DROP TABLE dbo.userfriends | ||
45 | |||
46 | EXECUTE sp_rename N'Tmp_userfriends', N'userfriends', 'OBJECT' | ||
47 | |||
48 | CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON userfriends | ||
49 | ( | ||
50 | ownerID | ||
51 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
52 | |||
53 | CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON userfriends | ||
54 | ( | ||
55 | friendID | ||
56 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
57 | |||
58 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/005_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/005_RegionStore.sql index 74e9d85..eb0862c 100644 --- a/OpenSim/Data/MSSQL/Resources/005_RegionStore.sql +++ b/OpenSim/Data/MSSQL/Resources/005_RegionStore.sql | |||
@@ -1,6 +1,6 @@ | |||
1 | BEGIN TRANSACTION | 1 | BEGIN TRANSACTION |
2 | 2 | ||
3 | CREATE TABLE dbo.Tmp_primshapes | 3 | CREATE TABLE Tmp_primshapes |
4 | ( | 4 | ( |
5 | UUID varchar(36) NOT NULL, | 5 | UUID varchar(36) NOT NULL, |
6 | Shape int NULL, | 6 | Shape int NULL, |
@@ -32,18 +32,18 @@ CREATE TABLE dbo.Tmp_primshapes | |||
32 | ) ON [PRIMARY] | 32 | ) ON [PRIMARY] |
33 | TEXTIMAGE_ON [PRIMARY] | 33 | TEXTIMAGE_ON [PRIMARY] |
34 | 34 | ||
35 | IF EXISTS(SELECT * FROM dbo.primshapes) | 35 | IF EXISTS(SELECT * FROM primshapes) |
36 | 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) | 36 | 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) |
37 | 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 dbo.primshapes WITH (HOLDLOCK TABLOCKX)') | 37 | 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)') |
38 | 38 | ||
39 | DROP TABLE dbo.primshapes | 39 | DROP TABLE primshapes |
40 | 40 | ||
41 | EXECUTE sp_rename N'dbo.Tmp_primshapes', N'primshapes', 'OBJECT' | 41 | EXECUTE sp_rename N'Tmp_primshapes', N'primshapes', 'OBJECT' |
42 | 42 | ||
43 | ALTER TABLE dbo.primshapes ADD CONSTRAINT | 43 | ALTER TABLE primshapes ADD CONSTRAINT |
44 | PK__primshapes__0880433F PRIMARY KEY CLUSTERED | 44 | PK__primshapes__0880433F PRIMARY KEY CLUSTERED |
45 | ( | 45 | ( |
46 | UUID | 46 | UUID |
47 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | 47 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] |
48 | 48 | ||
49 | COMMIT \ No newline at end of file | 49 | COMMIT |