From a228b5984e6523456871f2f8e51aa086050acbf2 Mon Sep 17 00:00:00 2001
From: MW
Date: Tue, 14 Aug 2007 13:54:46 +0000
Subject: Start of Inventory service, currently only (partially) functional in
 standalone mode and using sqlite). In standalone mode, if you have account
 authenticate turned on (setting in opensim.ini) then when you create a new
 account, a set of inventory is created for that account and stored in
 database (currently only a set of empty folders). Then during login the
 database is search for that set and sent to the client in the login response.
 More functions will be added soon, like creating new folders (and a bit later
 items) from the client inventory window.

---
 share/sql/sqlite3-inventory.sql | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 share/sql/sqlite3-inventory.sql

(limited to 'share/sql/sqlite3-inventory.sql')

diff --git a/share/sql/sqlite3-inventory.sql b/share/sql/sqlite3-inventory.sql
new file mode 100644
index 0000000..0575c28
--- /dev/null
+++ b/share/sql/sqlite3-inventory.sql
@@ -0,0 +1,40 @@
+--
+-- Database schema for inventory storage
+--
+-- 
+-- Some type mappings
+-- LLUID => char(36) (in ascii hex format)
+-- uint => integer
+-- string => varchar(256) until such time as we know we need bigger
+
+create table inventoryitems (
+        UUID char(36) primary key, -- inventoryid
+        assetID char(36), 
+        assetType integer, 
+        invType integer,
+	parentFolderID char(36),
+        avatarID char(36),
+        creatorsID char(36),
+        inventoryName varchar(256),
+        inventoryDescription varchar(256),
+        -- permissions
+        inventoryNextPermissions integer,
+        inventoryCurrentPermissions integer,
+        inventoryBasePermissions integer,
+        inventoryEveryOnePermissions integer
+);
+
+create index inventoryitems_parent on inventoryitems(parentFolderID);
+create index inventoryitems_ownerid on inventoryitems(avatarID);
+create index inventoryitems_assetid on inventoryitems(assetID);
+
+create table inventoryfolders (
+        -- The same UUID as prim, just to keep them easily linked
+        UUID varchar(36) primary key not null, --folderid
+        name varchar(256), 
+        agentID char(36),
+        parentID char(36),
+        type integer,
+        version integer
+);
+
-- 
cgit v1.1

