diff options
Diffstat (limited to 'OpenSim/Data/MySQL/Resources')
-rw-r--r-- | OpenSim/Data/MySQL/Resources/001_Friends.sql | 9 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/001_Presence.sql | 15 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/001_UserAccount.sql | 13 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/002_Friends.sql | 5 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/002_Presence.sql | 7 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/002_UserAccount.sql | 5 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/003_Presence.sql | 6 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/003_UserAccount.sql | 9 |
8 files changed, 69 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/Resources/001_Friends.sql b/OpenSim/Data/MySQL/Resources/001_Friends.sql new file mode 100644 index 0000000..e158a2c --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/001_Friends.sql | |||
@@ -0,0 +1,9 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE `Friends` ( | ||
4 | `PrincipalID` CHAR(36) NOT NULL, | ||
5 | `FriendID` VARCHAR(255) NOT NULL, | ||
6 | `Flags` CHAR(16) NOT NULL DEFAULT '0' | ||
7 | ) ENGINE=InnoDB; | ||
8 | |||
9 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/001_Presence.sql b/OpenSim/Data/MySQL/Resources/001_Presence.sql new file mode 100644 index 0000000..b8abaf7 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/001_Presence.sql | |||
@@ -0,0 +1,15 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE `Presence` ( | ||
4 | `UserID` VARCHAR(255) NOT NULL, | ||
5 | `RegionID` CHAR(36) NOT NULL, | ||
6 | `SessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', | ||
7 | `SecureSessionID` CHAR(36) 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 | ) ENGINE=InnoDB; | ||
14 | |||
15 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/001_UserAccount.sql b/OpenSim/Data/MySQL/Resources/001_UserAccount.sql new file mode 100644 index 0000000..07da571 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/001_UserAccount.sql | |||
@@ -0,0 +1,13 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE `UserAccounts` ( | ||
4 | `PrincipalID` CHAR(36) NOT NULL, | ||
5 | `ScopeID` CHAR(36) NOT NULL, | ||
6 | `FirstName` VARCHAR(64) NOT NULL, | ||
7 | `LastName` VARCHAR(64) NOT NULL, | ||
8 | `Email` VARCHAR(64), | ||
9 | `ServiceURLs` TEXT, | ||
10 | `Created` INT(11) | ||
11 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
12 | |||
13 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/002_Friends.sql b/OpenSim/Data/MySQL/Resources/002_Friends.sql new file mode 100644 index 0000000..5ff6438 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/002_Friends.sql | |||
@@ -0,0 +1,5 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | INSERT INTO Friends (PrincipalID, FriendID, Flags) SELECT ownerID, friendID, friendPerms FROM userfriends; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/002_Presence.sql b/OpenSim/Data/MySQL/Resources/002_Presence.sql new file mode 100644 index 0000000..e65f105 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/002_Presence.sql | |||
@@ -0,0 +1,7 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE Presence ADD COLUMN `HomeRegionID` CHAR(36) NOT NULL; | ||
4 | ALTER TABLE Presence ADD COLUMN `HomePosition` CHAR(64) NOT NULL DEFAULT '<0,0,0>'; | ||
5 | ALTER TABLE Presence ADD COLUMN `HomeLookAt` CHAR(64) NOT NULL DEFAULT '<0,0,0>'; | ||
6 | |||
7 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/002_UserAccount.sql b/OpenSim/Data/MySQL/Resources/002_UserAccount.sql new file mode 100644 index 0000000..ad2ddda --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/002_UserAccount.sql | |||
@@ -0,0 +1,5 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, lastname AS LastName, email as Email, CONCAT('AssetServerURI=', userAssetURI, ' InventoryServerURI=', userInventoryURI, ' GatewayURI= HomeURI=') AS ServiceURLs, created as Created FROM users; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/003_Presence.sql b/OpenSim/Data/MySQL/Resources/003_Presence.sql new file mode 100644 index 0000000..0efefa8 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/003_Presence.sql | |||
@@ -0,0 +1,6 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE UNIQUE INDEX SessionID ON Presence(SessionID); | ||
4 | CREATE INDEX UserID ON Presence(UserID); | ||
5 | |||
6 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/003_UserAccount.sql b/OpenSim/Data/MySQL/Resources/003_UserAccount.sql new file mode 100644 index 0000000..e42d93b --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/003_UserAccount.sql | |||
@@ -0,0 +1,9 @@ | |||
1 | BEGIN; | ||
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; | ||