2007-07-13 19:07:18 +00:00
|
|
|
--
|
|
|
|
-- Database schema for local prim storage
|
|
|
|
--
|
2007-08-06 19:06:18 +00:00
|
|
|
--
|
|
|
|
-- Some type mappings
|
|
|
|
-- LLUID => char(36) (in ascii hex format)
|
|
|
|
-- uint => integer
|
2007-08-06 19:51:12 +00:00
|
|
|
-- string => varchar(256) until such time as we know we need bigger
|
2007-07-13 19:07:18 +00:00
|
|
|
|
|
|
|
create table prims (
|
2007-08-08 15:50:48 +00:00
|
|
|
UUID char(36) primary key, -- this.UUID
|
2007-08-06 19:06:18 +00:00
|
|
|
ParentID integer default 0, -- this.ParentID
|
|
|
|
CreationDate integer, -- this.CreationDate
|
|
|
|
Name varchar(256),
|
2007-08-11 20:20:33 +00:00
|
|
|
SceneGroupID char(36),
|
2007-08-06 19:51:12 +00:00
|
|
|
-- various text fields
|
|
|
|
Text varchar(256),
|
|
|
|
Description varchar(256),
|
|
|
|
SitName varchar(256),
|
2007-08-08 15:50:48 +00:00
|
|
|
TouchName varchar(256),
|
2007-07-13 19:07:18 +00:00
|
|
|
-- permissions
|
2007-08-06 19:06:18 +00:00
|
|
|
CreatorID char(36),
|
2007-07-13 19:07:18 +00:00
|
|
|
OwnerID char(36),
|
2007-08-06 19:06:18 +00:00
|
|
|
GroupID char(36),
|
2007-07-17 14:25:30 +00:00
|
|
|
LastOwnerID char(36),
|
2007-07-13 19:07:18 +00:00
|
|
|
OwnerMask integer,
|
|
|
|
NextOwnerMask integer,
|
|
|
|
GroupMask integer,
|
|
|
|
EveryoneMask integer,
|
|
|
|
BaseMask integer,
|
|
|
|
-- vectors (converted from LLVector3)
|
2007-07-17 17:55:37 +00:00
|
|
|
PositionX float,
|
|
|
|
PositionY float,
|
|
|
|
PositionZ float,
|
2007-08-09 20:31:42 +00:00
|
|
|
GroupPositionX float,
|
|
|
|
GroupPositionY float,
|
|
|
|
GroupPositionZ float,
|
2007-08-06 19:51:12 +00:00
|
|
|
VelocityX float,
|
|
|
|
VelocityY float,
|
|
|
|
VelocityZ float,
|
|
|
|
AngularVelocityX float,
|
|
|
|
AngularVelocityY float,
|
|
|
|
AngularVelocityZ float,
|
|
|
|
AccelerationX float,
|
|
|
|
AccelerationY float,
|
|
|
|
AccelerationZ float,
|
2007-07-13 19:07:18 +00:00
|
|
|
-- quaternions (converted from LLQuaternion)
|
2007-07-17 17:55:37 +00:00
|
|
|
RotationX float,
|
|
|
|
RotationY float,
|
|
|
|
RotationZ float,
|
|
|
|
RotationW float
|
2007-07-17 14:25:30 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
create index prims_parent on prims(ParentID);
|
|
|
|
create index prims_ownerid on prims(OwnerID);
|
|
|
|
create index prims_lastownerid on prims(LastOwnerID);
|
|
|
|
|
|
|
|
create table primshapes (
|
2007-08-09 14:32:04 +00:00
|
|
|
-- The same UUID as prim, just to keep them easily linked
|
|
|
|
UUID varchar(36) primary key not null,
|
2007-07-17 14:25:30 +00:00
|
|
|
-- Shape is an enum
|
|
|
|
Shape integer,
|
|
|
|
-- vectors (converted from LLVector3)
|
2007-07-17 17:55:37 +00:00
|
|
|
ScaleX float,
|
|
|
|
ScaleY float,
|
|
|
|
ScaleZ float,
|
2007-07-13 19:07:18 +00:00
|
|
|
-- paths
|
|
|
|
PCode integer,
|
|
|
|
PathBegin integer,
|
|
|
|
PathEnd integer,
|
|
|
|
PathScaleX integer,
|
|
|
|
PathScaleY integer,
|
|
|
|
PathShearX integer,
|
|
|
|
PathShearY integer,
|
|
|
|
PathSkew integer,
|
|
|
|
PathCurve integer,
|
|
|
|
PathRadiusOffset integer,
|
|
|
|
PathRevolutions integer,
|
|
|
|
PathTaperX integer,
|
|
|
|
PathTaperY integer,
|
|
|
|
PathTwist integer,
|
|
|
|
PathTwistBegin integer,
|
|
|
|
-- profile
|
|
|
|
ProfileBegin integer,
|
|
|
|
ProfileEnd integer,
|
|
|
|
ProfileCurve integer,
|
|
|
|
ProfileHollow integer,
|
|
|
|
-- text
|
|
|
|
Texture blob
|
|
|
|
);
|
|
|
|
|