diff options
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/001_UserAccount.sql | 14 | ||||
-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/003_UserAccount.sql | 9 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/004_UserAccount.sql | 7 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/007_GridStore.sql | 9 |
12 files changed, 131 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..94d240b --- /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 | [Friend] 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/001_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql new file mode 100644 index 0000000..3dbf8a4 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql | |||
@@ -0,0 +1,14 @@ | |||
1 | CREATE TABLE [UserAccounts] ( | ||
2 | [PrincipalID] uniqueidentifier NOT NULL, | ||
3 | [ScopeID] uniqueidentifier NOT NULL, | ||
4 | [FirstName] [varchar](64) NOT NULL, | ||
5 | [LastName] [varchar](64) NOT NULL, | ||
6 | [Email] [varchar](64) NULL, | ||
7 | [ServiceURLs] [text] NULL, | ||
8 | [Created] [int] default NULL, | ||
9 | |||
10 | PRIMARY KEY CLUSTERED | ||
11 | ( | ||
12 | [PrincipalID] 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] | ||
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..e67d20e --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql | |||
@@ -0,0 +1,6 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | INSERT INTO Friends (PrincipalID, Friend, 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/003_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql new file mode 100644 index 0000000..da0395b --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql | |||
@@ -0,0 +1,9 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID); | ||
4 | CREATE INDEX Email ON UserAccounts(Email); | ||
5 | CREATE INDEX FirstName ON UserAccounts(FirstName); | ||
6 | CREATE INDEX LastName ON UserAccounts(LastName); | ||
7 | CREATE INDEX Name ON UserAccounts(FirstName,LastName); | ||
8 | |||
9 | COMMIT \ No newline at end of file | ||
diff --git a/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql new file mode 100644 index 0000000..a9a9021 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql | |||
@@ -0,0 +1,7 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE UserAccounts ADD UserLevel integer NOT NULL DEFAULT 0; | ||
4 | ALTER TABLE UserAccounts ADD UserFlags integer NOT NULL DEFAULT 0; | ||
5 | ALTER TABLE UserAccounts ADD UserTitle varchar(64) NOT NULL DEFAULT ''; | ||
6 | |||
7 | 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 | ||