diff options
author | StrawberryFride | 2010-02-24 16:42:39 +0000 |
---|---|---|
committer | Melanie | 2010-02-24 15:50:44 +0000 |
commit | 2fa5694ec9857f208b6fe4d0890fd2ab8ac1b8bf (patch) | |
tree | 672ec2bb3e64b8f930faa9a87801ba9042e2d4f7 /OpenSim/Data/MSSQL/Resources | |
parent | Fixed typo that was affecting the BasicInventoryAccessModule (diff) | |
download | opensim-SC-2fa5694ec9857f208b6fe4d0890fd2ab8ac1b8bf.zip opensim-SC-2fa5694ec9857f208b6fe4d0890fd2ab8ac1b8bf.tar.gz opensim-SC-2fa5694ec9857f208b6fe4d0890fd2ab8ac1b8bf.tar.bz2 opensim-SC-2fa5694ec9857f208b6fe4d0890fd2ab8ac1b8bf.tar.xz |
MSSQL Additions for Presence Refactor branch. Most functionality tested and works, some outstanding issues around login location and border crossings on y axis.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources')
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/001_AuthStore.sql | 17 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/001_Avatar.sql | 15 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql | 11 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/001_Presence.sql | 19 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/002_AuthStore.sql | 6 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql | 6 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/002_Presence.sql | 6 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/002_UserAccount.sql | 12 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/007_GridStore.sql | 9 |
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 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE 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 | |||
11 | CREATE 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 | |||
17 | COMMIT \ 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 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE [Avatars] ( | ||
4 | [PrincipalID] uniqueidentifier NOT NULL, | ||
5 | [Name] varchar(32) NOT NULL, | ||
6 | [Value] varchar(255) NOT NULL DEFAULT '', | ||
7 | PRIMARY 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 | |||
15 | COMMIT \ 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 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE 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 | |||
11 | COMMIT \ 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 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE 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 | |||
19 | COMMIT \ 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 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | 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; | ||
4 | |||
5 | |||
6 | COMMIT \ 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 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | INSERT INTO Friends (PrincipalID, FriendID, Flags, Offered) SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends; | ||
4 | |||
5 | |||
6 | COMMIT \ 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 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE UNIQUE INDEX SessionID ON Presence(SessionID); | ||
4 | CREATE INDEX UserID ON Presence(UserID); | ||
5 | |||
6 | COMMIT \ 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 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, | ||
4 | username AS FirstName, | ||
5 | lastname AS LastName, | ||
6 | email as Email, ( | ||
7 | 'AssetServerURI=' + | ||
8 | userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS ServiceURLs, | ||
9 | created as Created FROM users; | ||
10 | |||
11 | |||
12 | COMMIT \ 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 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE regions ADD [flags] integer NOT NULL DEFAULT 0; | ||
4 | CREATE INDEX [flags] ON regions(flags); | ||
5 | ALTER TABLE [regions] ADD [last_seen] integer NOT NULL DEFAULT 0; | ||
6 | ALTER TABLE [regions] ADD [PrincipalID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; | ||
7 | ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0; | ||
8 | |||
9 | COMMIT | ||