aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/Resources
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources')
-rw-r--r--OpenSim/Data/MSSQL/Resources/001_AuthStore.sql17
-rw-r--r--OpenSim/Data/MSSQL/Resources/001_Avatar.sql15
-rw-r--r--OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql11
-rw-r--r--OpenSim/Data/MSSQL/Resources/001_Presence.sql19
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_AuthStore.sql6
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql6
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_Presence.sql6
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_UserAccount.sql12
-rw-r--r--OpenSim/Data/MSSQL/Resources/007_GridStore.sql9
9 files changed, 101 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/001_AuthStore.sql b/OpenSim/Data/MSSQL/Resources/001_AuthStore.sql
new file mode 100644
index 0000000..c70a193
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/001_AuthStore.sql
@@ -0,0 +1,17 @@
1BEGIN TRANSACTION
2
3CREATE TABLE [auth] (
4 [uuid] [uniqueidentifier] NOT NULL default '00000000-0000-0000-0000-000000000000',
5 [passwordHash] [varchar](32) NOT NULL,
6 [passwordSalt] [varchar](32) NOT NULL,
7 [webLoginKey] [varchar](255) NOT NULL,
8 [accountType] VARCHAR(32) NOT NULL DEFAULT 'UserAccount',
9) ON [PRIMARY]
10
11CREATE TABLE [tokens] (
12 [uuid] [uniqueidentifier] NOT NULL default '00000000-0000-0000-0000-000000000000',
13 [token] [varchar](255) NOT NULL,
14 [validity] [datetime] NOT NULL )
15 ON [PRIMARY]
16
17COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/001_Avatar.sql b/OpenSim/Data/MSSQL/Resources/001_Avatar.sql
new file mode 100644
index 0000000..48f4c00
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/001_Avatar.sql
@@ -0,0 +1,15 @@
1BEGIN TRANSACTION
2
3CREATE TABLE [Avatars] (
4[PrincipalID] uniqueidentifier NOT NULL,
5[Name] varchar(32) NOT NULL,
6[Value] varchar(255) NOT NULL DEFAULT '',
7PRIMARY KEY CLUSTERED
8(
9 [PrincipalID] ASC, [Name] ASC
10)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
11) ON [PRIMARY]
12
13
14
15COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql b/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql
new file mode 100644
index 0000000..f6480f7
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql
@@ -0,0 +1,11 @@
1BEGIN TRANSACTION
2
3CREATE TABLE [Friends] (
4[PrincipalID] uniqueidentifier NOT NULL,
5[FriendID] varchar(255) NOT NULL,
6[Flags] char(16) NOT NULL DEFAULT '0',
7[Offered] varchar(32) NOT NULL DEFAULT 0)
8 ON [PRIMARY]
9
10
11COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/001_Presence.sql b/OpenSim/Data/MSSQL/Resources/001_Presence.sql
new file mode 100644
index 0000000..877881c
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/001_Presence.sql
@@ -0,0 +1,19 @@
1BEGIN TRANSACTION
2
3CREATE TABLE [Presence] (
4[UserID] varchar(255) NOT NULL,
5[RegionID] uniqueidentifier NOT NULL,
6[SessionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
7[SecureSessionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
8[Online] char(5) NOT NULL DEFAULT 'false',
9[Login] char(16) NOT NULL DEFAULT '0',
10[Logout] char(16) NOT NULL DEFAULT '0',
11[Position] char(64) NOT NULL DEFAULT '<0,0,0>',
12[LookAt] char(64) NOT NULL DEFAULT '<0,0,0>',
13[HomeRegionID] uniqueidentifier NOT NULL,
14[HomePosition] CHAR(64) NOT NULL DEFAULT '<0,0,0>',
15[HomeLookAt] CHAR(64) NOT NULL DEFAULT '<0,0,0>',
16)
17 ON [PRIMARY]
18
19COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/002_AuthStore.sql b/OpenSim/Data/MSSQL/Resources/002_AuthStore.sql
new file mode 100644
index 0000000..daed955
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/002_AuthStore.sql
@@ -0,0 +1,6 @@
1BEGIN TRANSACTION
2
3INSERT 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;
4
5
6COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql b/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql
new file mode 100644
index 0000000..7762a26
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql
@@ -0,0 +1,6 @@
1BEGIN TRANSACTION
2
3INSERT INTO Friends (PrincipalID, FriendID, Flags, Offered) SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends;
4
5
6COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/002_Presence.sql b/OpenSim/Data/MSSQL/Resources/002_Presence.sql
new file mode 100644
index 0000000..a67671d
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/002_Presence.sql
@@ -0,0 +1,6 @@
1BEGIN TRANSACTION
2
3CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
4CREATE INDEX UserID ON Presence(UserID);
5
6COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/002_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/002_UserAccount.sql
new file mode 100644
index 0000000..89d1f34
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/002_UserAccount.sql
@@ -0,0 +1,12 @@
1BEGIN TRANSACTION
2
3INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID,
4username AS FirstName,
5lastname AS LastName,
6email as Email, (
7'AssetServerURI=' +
8userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS ServiceURLs,
9created as Created FROM users;
10
11
12COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/007_GridStore.sql b/OpenSim/Data/MSSQL/Resources/007_GridStore.sql
new file mode 100644
index 0000000..0b66d40
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/007_GridStore.sql
@@ -0,0 +1,9 @@
1BEGIN TRANSACTION
2
3ALTER TABLE regions ADD [flags] integer NOT NULL DEFAULT 0;
4CREATE INDEX [flags] ON regions(flags);
5ALTER TABLE [regions] ADD [last_seen] integer NOT NULL DEFAULT 0;
6ALTER TABLE [regions] ADD [PrincipalID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
7ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0;
8
9COMMIT