CREATE TABLE `Prims` (
  `ParentID` int(11) default NULL,
  `CreationDate` int(11) default NULL,
  `Name` varchar(255) default NULL,
  `ParentUUID` char(36) default NULL,
  `Text` varchar(255) default NULL,
  `Description` varchar(255) default NULL,
  `SitName` varchar(255) default NULL,
  `TouchName` varchar(255) default NULL,
  `ObjectFlags` int(11) default NULL,
  `OwnerMask` int(11) default NULL,
  `NextOwnerMask` int(11) default NULL,
  `GroupMask` int(11) default NULL,
  `EveryoneMask` int(11) default NULL,
  `BaseMask` int(11) default NULL,
  `PositionX` float default NULL,
  `PositionY` float default NULL,
  `PositionZ` float default NULL,
  `GroupPositionX` float default NULL,
  `GroupPositionY` float default NULL,
  `GroupPositionZ` float default NULL,
  `VelocityX` float default NULL,
  `VelocityY` float default NULL,
  `VelocityZ` float default NULL,
  `AngularVelocityX` float default NULL,
  `AngularVelocityY` float default NULL,
  `AngularVelocityZ` float default NULL,
  `AccelerationX` float default NULL,
  `AccelerationY` float default NULL,
  `AccelerationZ` float default NULL,
  `RotationX` float default NULL,
  `RotationY` float default NULL,
  `RotationZ` float default NULL,
  `RotationW` float default NULL,
  `SitTargetOffsetX` float default NULL,
  `SitTargetOffsetY` float default NULL,
  `SitTargetOffsetZ` float default NULL,
  `SitTargetOrientW` float default NULL,
  `SitTargetOrientX` float default NULL,
  `SitTargetOrientY` float default NULL,
  `SitTargetOrientZ` float default NULL,
  `UUID` char(36) NOT NULL default '',
  `RegionID` char(36) default NULL,
  `CreatorID` char(36) default NULL,
  `OwnerID` char(36) default NULL,
  `GroupID` char(36) default NULL,
  `LastOwnerID` char(36) default NULL,
  PRIMARY KEY  (`UUID`),
  KEY `prims_regionuuid` (`RegionID`),
  KEY 'prims_parentuuid' ('ParentUUID')
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `PrimShapes` (
  `Shape` int(11) default NULL,
  `ScaleX` float default NULL,
  `ScaleY` float default NULL,
  `ScaleZ` float default NULL,
  `PCode` int(11) default NULL,
  `PathBegin` int(11) default NULL,
  `PathEnd` int(11) default NULL,
  `PathScaleX` int(11) default NULL,
  `PathScaleY` int(11) default NULL,
  `PathShearX` int(11) default NULL,
  `PathShearY` int(11) default NULL,
  `PathSkew` int(11) default NULL,
  `PathCurve` int(11) default NULL,
  `PathRadiusOffset` int(11) default NULL,
  `PathRevolutions` int(11) default NULL,
  `PathTaperX` int(11) default NULL,
  `PathTaperY` int(11) default NULL,
  `PathTwist` int(11) default NULL,
  `PathTwistBegin` int(11) default NULL,
  `ProfileBegin` int(11) default NULL,
  `ProfileEnd` int(11) default NULL,
  `ProfileCurve` int(11) default NULL,
  `ProfileHollow` int(11) default NULL,
  `State` int(11) default NULL,
  `Texture` longblob,
  `ExtraParams` longblob,
  `UUID` char(36) NOT NULL default '',
  PRIMARY KEY  (`UUID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;           
