diff options
Diffstat (limited to 'OpenSim/Data/SQLite/Resources')
-rw-r--r-- | OpenSim/Data/SQLite/Resources/001_AuthStore.sql | 18 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/001_Avatar.sql | 9 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/001_FriendsStore.sql | 10 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/001_GridUserStore.sql | 16 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/001_UserAccount.sql | 17 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql | 38 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/002_AuthStore.sql | 5 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/002_FriendsStore.sql | 5 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/002_UserAccount.sql | 5 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql | 8 |
10 files changed, 131 insertions, 0 deletions
diff --git a/OpenSim/Data/SQLite/Resources/001_AuthStore.sql b/OpenSim/Data/SQLite/Resources/001_AuthStore.sql new file mode 100644 index 0000000..468567d --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/001_AuthStore.sql | |||
@@ -0,0 +1,18 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | CREATE TABLE auth ( | ||
4 | UUID char(36) NOT NULL, | ||
5 | passwordHash char(32) NOT NULL default '', | ||
6 | passwordSalt char(32) NOT NULL default '', | ||
7 | webLoginKey varchar(255) NOT NULL default '', | ||
8 | accountType VARCHAR(32) NOT NULL DEFAULT 'UserAccount', | ||
9 | PRIMARY KEY (`UUID`) | ||
10 | ); | ||
11 | |||
12 | CREATE TABLE tokens ( | ||
13 | UUID char(36) NOT NULL, | ||
14 | token varchar(255) NOT NULL, | ||
15 | validity datetime NOT NULL | ||
16 | ); | ||
17 | |||
18 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/001_Avatar.sql b/OpenSim/Data/SQLite/Resources/001_Avatar.sql new file mode 100644 index 0000000..7ec906b --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/001_Avatar.sql | |||
@@ -0,0 +1,9 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | CREATE TABLE Avatars ( | ||
4 | PrincipalID CHAR(36) NOT NULL, | ||
5 | Name VARCHAR(32) NOT NULL, | ||
6 | Value VARCHAR(255) NOT NULL DEFAULT '', | ||
7 | PRIMARY KEY(PrincipalID, Name)); | ||
8 | |||
9 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/001_FriendsStore.sql b/OpenSim/Data/SQLite/Resources/001_FriendsStore.sql new file mode 100644 index 0000000..f1b9ab9 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/001_FriendsStore.sql | |||
@@ -0,0 +1,10 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | CREATE TABLE `Friends` ( | ||
4 | `PrincipalID` CHAR(36) NOT NULL, | ||
5 | `Friend` VARCHAR(255) NOT NULL, | ||
6 | `Flags` VARCHAR(16) NOT NULL DEFAULT 0, | ||
7 | `Offered` VARCHAR(32) NOT NULL DEFAULT 0, | ||
8 | PRIMARY KEY(`PrincipalID`, `Friend`)); | ||
9 | |||
10 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/001_GridUserStore.sql b/OpenSim/Data/SQLite/Resources/001_GridUserStore.sql new file mode 100644 index 0000000..1a24613 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/001_GridUserStore.sql | |||
@@ -0,0 +1,16 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | CREATE TABLE GridUser ( | ||
4 | UserID VARCHAR(255) primary key, | ||
5 | HomeRegionID CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', | ||
6 | HomePosition CHAR(64) NOT NULL DEFAULT '<0,0,0>', | ||
7 | HomeLookAt CHAR(64) NOT NULL DEFAULT '<0,0,0>', | ||
8 | LastRegionID CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', | ||
9 | LastPosition CHAR(64) NOT NULL DEFAULT '<0,0,0>', | ||
10 | LastLookAt CHAR(64) NOT NULL DEFAULT '<0,0,0>', | ||
11 | Online CHAR(5) NOT NULL DEFAULT 'false', | ||
12 | Login CHAR(16) NOT NULL DEFAULT '0', | ||
13 | Logout CHAR(16) NOT NULL DEFAULT '0' | ||
14 | ) ; | ||
15 | |||
16 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/001_UserAccount.sql b/OpenSim/Data/SQLite/Resources/001_UserAccount.sql new file mode 100644 index 0000000..c38d9a7 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/001_UserAccount.sql | |||
@@ -0,0 +1,17 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | -- useraccounts table | ||
4 | CREATE TABLE UserAccounts ( | ||
5 | PrincipalID CHAR(36) primary key, | ||
6 | ScopeID CHAR(36) NOT NULL, | ||
7 | FirstName VARCHAR(64) NOT NULL, | ||
8 | LastName VARCHAR(64) NOT NULL, | ||
9 | Email VARCHAR(64), | ||
10 | ServiceURLs TEXT, | ||
11 | Created INT(11), | ||
12 | UserLevel integer NOT NULL DEFAULT 0, | ||
13 | UserFlags integer NOT NULL DEFAULT 0, | ||
14 | UserTitle varchar(64) NOT NULL DEFAULT '' | ||
15 | ); | ||
16 | |||
17 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql b/OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql new file mode 100644 index 0000000..7e21996 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql | |||
@@ -0,0 +1,38 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | CREATE TABLE inventoryfolders( | ||
4 | folderName varchar(255), | ||
5 | type integer, | ||
6 | version integer, | ||
7 | folderID varchar(255) primary key, | ||
8 | agentID varchar(255) not null default '00000000-0000-0000-0000-000000000000', | ||
9 | parentFolderID varchar(255) not null default '00000000-0000-0000-0000-000000000000'); | ||
10 | |||
11 | CREATE TABLE inventoryitems( | ||
12 | assetID varchar(255), | ||
13 | assetType integer, | ||
14 | inventoryName varchar(255), | ||
15 | inventoryDescription varchar(255), | ||
16 | inventoryNextPermissions integer, | ||
17 | inventoryCurrentPermissions integer, | ||
18 | invType integer, | ||
19 | creatorID varchar(255), | ||
20 | inventoryBasePermissions integer, | ||
21 | inventoryEveryOnePermissions integer, | ||
22 | salePrice integer default 99, | ||
23 | saleType integer default 0, | ||
24 | creationDate integer default 2000, | ||
25 | groupID varchar(255) default '00000000-0000-0000-0000-000000000000', | ||
26 | groupOwned integer default 0, | ||
27 | flags integer default 0, | ||
28 | inventoryID varchar(255) primary key, | ||
29 | parentFolderID varchar(255) not null default '00000000-0000-0000-0000-000000000000', | ||
30 | avatarID varchar(255) not null default '00000000-0000-0000-0000-000000000000', | ||
31 | inventoryGroupPermissions integer not null default 0); | ||
32 | |||
33 | create index inventoryfolders_agentid on inventoryfolders(agentID); | ||
34 | create index inventoryfolders_parentid on inventoryfolders(parentFolderID); | ||
35 | create index inventoryitems_parentfolderid on inventoryitems(parentFolderID); | ||
36 | create index inventoryitems_avatarid on inventoryitems(avatarID); | ||
37 | |||
38 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/002_AuthStore.sql b/OpenSim/Data/SQLite/Resources/002_AuthStore.sql new file mode 100644 index 0000000..3237b68 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/002_AuthStore.sql | |||
@@ -0,0 +1,5 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql b/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql new file mode 100644 index 0000000..6733502 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql | |||
@@ -0,0 +1,5 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/002_UserAccount.sql b/OpenSim/Data/SQLite/Resources/002_UserAccount.sql new file mode 100644 index 0000000..c7a6293 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/002_UserAccount.sql | |||
@@ -0,0 +1,5 @@ | |||
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, username AS FirstName, surname AS LastName, '' as Email, '' AS ServiceURLs, created as Created FROM users; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql b/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql new file mode 100644 index 0000000..d38e2b7 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql | |||
@@ -0,0 +1,8 @@ | |||
1 | ATTACH 'inventoryStore.db' AS old; | ||
2 | |||
3 | BEGIN TRANSACTION; | ||
4 | |||
5 | INSERT INTO inventoryfolders (folderName, type, version, folderID, agentID, parentFolderID) SELECT `name` AS folderName, `type` AS type, `version` AS version, `UUID` AS folderID, `agentID` AS agentID, `parentID` AS parentFolderID from old.inventoryfolders; | ||
6 | INSERT INTO inventoryitems (assetID, assetType, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryID, parentFolderID, avatarID, inventoryGroupPermissions) SELECT `assetID`, `assetType` AS assetType, `inventoryName` AS inventoryName, `inventoryDescription` AS inventoryDescription, `inventoryNextPermissions` AS inventoryNextPermissions, `inventoryCurrentPermissions` AS inventoryCurrentPermissions, `invType` AS invType, `creatorsID` AS creatorID, `inventoryBasePermissions` AS inventoryBasePermissions, `inventoryEveryOnePermissions` AS inventoryEveryOnePermissions, `salePrice` AS salePrice, `saleType` AS saleType, `creationDate` AS creationDate, `groupID` AS groupID, `groupOwned` AS groupOwned, `flags` AS flags, `UUID` AS inventoryID, `parentFolderID` AS parentFolderID, `avatarID` AS avatarID, `inventoryGroupPermissions` AS inventoryGroupPermissions FROM old.inventoryitems; | ||
7 | |||
8 | COMMIT; | ||