Thank you kindly, Tlaukkan (Tommil) for a patch that:
Cleaned up schema creation scripts of MySQL to compliant form and created SQLite scripts from them. In future it would be optimal if scripts from different databases could be generated from MySQL scripts to ensure optimal consistency between schemas of different databases. Did not yet review column names. ID columns seem to have variety in naming which can be confusing.0.6.2-post-fixes
parent
ade107f04f
commit
c00c855cc5
|
@ -1,15 +1,10 @@
|
||||||
START TRANSACTION;
|
CREATE TABLE Assets (
|
||||||
|
ID VARCHAR(36) NOT NULL,
|
||||||
CREATE TABLE `Assets` (
|
Type TINYINT DEFAULT NULL,
|
||||||
`ID` char(36) NOT NULL,
|
Name VARCHAR(64) DEFAULT NULL,
|
||||||
`Type` smallint(6) default NULL,
|
Description VARCHAR(64) DEFAULT NULL,
|
||||||
`InvType` smallint(6) default NULL,
|
Local BIT DEFAULT NULL,
|
||||||
`Name` varchar(64) default NULL,
|
Temporary BIT DEFAULT NULL,
|
||||||
`Description` varchar(64) default NULL,
|
Data LONGBLOB,
|
||||||
`Local` tinyint(1) default NULL,
|
PRIMARY KEY (ID)
|
||||||
`Temporary` tinyint(1) default NULL,
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||||
`Data` longblob,
|
|
||||||
PRIMARY KEY (`ID`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
COMMIT;
|
|
||||||
|
|
|
@ -1,32 +1,35 @@
|
||||||
CREATE TABLE `regions` (
|
CREATE TABLE Regions (
|
||||||
`Uuid` varchar(36) NOT NULL,
|
RegionID VARCHAR(36) NOT NULL,
|
||||||
`RegionHandle` bigint(20) unsigned NOT NULL,
|
OwnerID VARCHAR(36) DEFAULT NULL,
|
||||||
`RegionName` varchar(32) default NULL,
|
OriginID VARCHAR(36) DEFAULT NULL,
|
||||||
`RegionRecvKey` varchar(128) default NULL,
|
RegionHandle BIGINT DEFAULT NULL,
|
||||||
`RegionSendKey` varchar(128) default NULL,
|
RegionName VARCHAR(32) DEFAULT NULL,
|
||||||
`RegionSecret` varchar(128) default NULL,
|
RegionRecvKey VARCHAR(128) DEFAULT NULL,
|
||||||
`RegionDataURI` varchar(255) default NULL,
|
RegionSendKey VARCHAR(128) DEFAULT NULL,
|
||||||
`ServerIP` varchar(64) default NULL,
|
RegionSecret VARCHAR(128) DEFAULT NULL,
|
||||||
`ServerPort` int(10) unsigned default NULL,
|
RegionDataURI VARCHAR(255) DEFAULT NULL,
|
||||||
`ServerURI` varchar(255) default NULL,
|
ServerIP VARCHAR(64) DEFAULT NULL,
|
||||||
`RegionLocX` int(10) unsigned default NULL,
|
ServerPort INT DEFAULT NULL,
|
||||||
`RegionLocY` int(10) unsigned default NULL,
|
ServerURI VARCHAR(255) DEFAULT NULL,
|
||||||
`RegionLocZ` int(10) unsigned default NULL,
|
RegionLocX INT DEFAULT NULL,
|
||||||
`EastOverrideHandle` bigint(20) unsigned default NULL,
|
RegionLocY INT DEFAULT NULL,
|
||||||
`WestOverrideHandle` bigint(20) unsigned default NULL,
|
RegionLocZ INT DEFAULT NULL,
|
||||||
`SouthOverrideHandle` bigint(20) unsigned default NULL,
|
EastOverrideHandle BIGINT DEFAULT NULL,
|
||||||
`NorthOverrideHandle` bigint(20) unsigned default NULL,
|
WestOverrideHandle BIGINT DEFAULT NULL,
|
||||||
`RegionAssetURI` varchar(255) default NULL,
|
SouthOverrideHandle BIGINT DEFAULT NULL,
|
||||||
`RegionAssetRecvKey` varchar(128) default NULL,
|
NorthOverrideHandle BIGINT DEFAULT NULL,
|
||||||
`RegionAssetSendKey` varchar(128) default NULL,
|
RegionAssetURI VARCHAR(255) DEFAULT NULL,
|
||||||
`RegionUserURI` varchar(255) default NULL,
|
RegionAssetRecvKey VARCHAR(128) DEFAULT NULL,
|
||||||
`RegionUserRecvKey` varchar(128) default NULL,
|
RegionAssetSendKey VARCHAR(128) DEFAULT NULL,
|
||||||
`RegionUserSendKey` varchar(128) default NULL, `regionMapTexture` varchar(36) default NULL,
|
RegionUserURI VARCHAR(255) DEFAULT NULL,
|
||||||
`ServerHttpPort` int(10) default NULL, `serverRemotingPort` int(10) default NULL,
|
RegionUserRecvKey VARCHAR(128) DEFAULT NULL,
|
||||||
`Owner_uuid` varchar(36) default '00000000-0000-0000-0000-000000000000' not null,
|
RegionUserSendKey VARCHAR(128) DEFAULT NULL,
|
||||||
`OriginUUID` varchar(36),
|
RegionMapTexture VARCHAR(36) DEFAULT NULL,
|
||||||
PRIMARY KEY (`uuid`),
|
ServerHttpPort INT DEFAULT NULL,
|
||||||
KEY `region_name` (`RegionName`),
|
ServerRemotingPort INT DEFAULT NULL,
|
||||||
KEY `region_handle` (`RegionHandle`),
|
PRIMARY KEY (uuid),
|
||||||
KEY `overrideHandles` (`EastOverrideHandle`,`WestOverrideHandle`,`SouthOverrideHandle`,`NorthOverrideHandle`)
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Rev. 3';
|
|
||||||
|
CREATE INDEX RegionNameIndex ON Regions (RegionName);
|
||||||
|
CREATE INDEX RegionHandleIndex ON Regions (RegionHandle);
|
||||||
|
CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle);
|
||||||
|
|
|
@ -1,41 +1,39 @@
|
||||||
START TRANSACTION;
|
CREATE TABLE InventoryFolders (
|
||||||
|
ID VARCHAR(36) NOT NULL,
|
||||||
|
Type SMALLINT DEFAULT NULL,
|
||||||
|
Version SMALLINT DEFAULT NULL,
|
||||||
|
ParentID VARCHAR(36) DEFAULT NULL,
|
||||||
|
Owner VARCHAR(36) DEFAULT NULL,
|
||||||
|
Name VARCHAR(64) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (ID)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||||
|
|
||||||
CREATE TABLE `InventoryFolders` (
|
CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner);
|
||||||
`ID` char(36) NOT NULL,
|
CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID);
|
||||||
`Type` int(11) default NULL,
|
|
||||||
`Version` int(11) default NULL,
|
|
||||||
`ParentID` char(36) default NULL,
|
|
||||||
`Owner` char(36) default NULL,
|
|
||||||
`Name` varchar(64) default NULL,
|
|
||||||
PRIMARY KEY (`ID`),
|
|
||||||
KEY `folder_owner_id` (`Owner`),
|
|
||||||
KEY `folder_parent_id` (`ParentID`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `InventoryItems` (
|
CREATE TABLE InventoryItems (
|
||||||
`ID` char(36) NOT NULL,
|
ID VARCHAR(36) NOT NULL,
|
||||||
`InvType` smallint(6) default NULL,
|
InvType SMALLINT DEFAULT NULL,
|
||||||
`AssetType` smallint(6) default NULL,
|
AssetType SMALLINT DEFAULT NULL,
|
||||||
`AssetID` char(36) default NULL,
|
AssetID VARCHAR(36) DEFAULT NULL,
|
||||||
`Folder` char(36) default NULL,
|
Folder VARCHAR(36) DEFAULT NULL,
|
||||||
`Owner` char(36) default NULL,
|
Owner VARCHAR(36) DEFAULT NULL,
|
||||||
`Creator` char(36) default NULL,
|
Creator VARCHAR(36) DEFAULT NULL,
|
||||||
`Name` varchar(64) default NULL,
|
Name VARCHAR(64) DEFAULT NULL,
|
||||||
`Description` varchar(64) default NULL,
|
Description VARCHAR(64) DEFAULT NULL,
|
||||||
`NextPermissions` int(11) default NULL,
|
NextPermissions INT DEFAULT NULL,
|
||||||
`CurrentPermissions` int(11) default NULL,
|
CurrentPermissions INT DEFAULT NULL,
|
||||||
`BasePermissions` int(11) default NULL,
|
BasePermissions INT DEFAULT NULL,
|
||||||
`EveryOnePermissions` int(11) default NULL,
|
EveryOnePermissions INT DEFAULT NULL,
|
||||||
`GroupID` char(36) default NULL,
|
GroupID VARCHAR(36) DEFAULT NULL,
|
||||||
`GroupOwned` tinyint(1) default NULL,
|
GroupOwned BIT DEFAULT NULL,
|
||||||
`SalePrice` int(11) default NULL,
|
SalePrice INT DEFAULT NULL,
|
||||||
`SaleType` smallint(6) default NULL,
|
SaleType TINYINT DEFAULT NULL,
|
||||||
`Flags` int(11) default NULL,
|
Flags INT DEFAULT NULL,
|
||||||
`CreationDate` int(11) default NULL,
|
CreationDate INT DEFAULT NULL,
|
||||||
PRIMARY KEY (`ID`),
|
PRIMARY KEY (ID)
|
||||||
KEY `item_group_id` (`GroupID`),
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||||
KEY `item_owner_id` (`Owner`),
|
|
||||||
KEY `item_folder_id` (`Folder`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
COMMIT;
|
CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID);
|
||||||
|
CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner);
|
||||||
|
CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder);
|
||||||
|
|
|
@ -1,87 +1,169 @@
|
||||||
CREATE TABLE `Prims` (
|
CREATE TABLE Prims (
|
||||||
`UUID` char(36) NOT NULL default '',
|
UUID VARCHAR(36) NOT NULL,
|
||||||
`RegionID` char(36) default NULL,
|
RegionID VARCHAR(36) DEFAULT NULL,
|
||||||
`GroupID` char(36) default NULL,
|
GroupID VARCHAR(36) DEFAULT NULL,
|
||||||
`ParentID` int(11) default NULL,
|
ParentID INT DEFAULT NULL,
|
||||||
`ParentUUID` char(36) default NULL,
|
ParentUUID VARCHAR(36) DEFAULT NULL,
|
||||||
`OwnerID` char(36) default NULL,
|
OwnerID VARCHAR(36) DEFAULT NULL,
|
||||||
`LastOwnerID` char(36) default NULL,
|
LastOwnerID VARCHAR(36) DEFAULT NULL,
|
||||||
`CreatorID` char(36) default NULL,
|
CreatorID VARCHAR(36) DEFAULT NULL,
|
||||||
`CreationDate` int(11) default NULL,
|
CreationDate INT DEFAULT NULL,
|
||||||
`LinkNum` int(11) default NULL,
|
LinkNum INT DEFAULT NULL,
|
||||||
`Name` varchar(255) default NULL,
|
Name VARCHAR(255) DEFAULT NULL,
|
||||||
`Text` varchar(255) default NULL,
|
Text VARCHAR(255) DEFAULT NULL,
|
||||||
`Description` varchar(255) default NULL,
|
Description VARCHAR(255) DEFAULT NULL,
|
||||||
`SitName` varchar(255) default NULL,
|
SitName VARCHAR(255) DEFAULT NULL,
|
||||||
`TouchName` varchar(255) default NULL,
|
TouchName VARCHAR(255) DEFAULT NULL,
|
||||||
`ObjectFlags` int(11) default NULL,
|
ObjectFlags INT DEFAULT NULL,
|
||||||
`OwnerMask` int(11) default NULL,
|
OwnerMask INT DEFAULT NULL,
|
||||||
`NextOwnerMask` int(11) default NULL,
|
NextOwnerMask INT DEFAULT NULL,
|
||||||
`GroupMask` int(11) default NULL,
|
GroupMask INT DEFAULT NULL,
|
||||||
`EveryoneMask` int(11) default NULL,
|
EveryoneMask INT DEFAULT NULL,
|
||||||
`BaseMask` int(11) default NULL,
|
BaseMask INT DEFAULT NULL,
|
||||||
`Material` int(1) default NULL,
|
Material TINYINT DEFAULT NULL,
|
||||||
`ScriptAccessPin` int(11) default NULL,
|
ScriptAccessPin INT DEFAULT NULL,
|
||||||
`TextureAnimation` blob,
|
TextureAnimation BLOB,
|
||||||
`ParticleSystem` blob,
|
ParticleSystem BLOB,
|
||||||
`ClickAction` int(1) default NULL,
|
ClickAction TINYINT DEFAULT NULL,
|
||||||
`Color` int(11) default NULL,
|
Color INT DEFAULT NULL,
|
||||||
`PositionX` double default NULL,
|
PositionX DOUBLE DEFAULT NULL,
|
||||||
`PositionY` double default NULL,
|
PositionY DOUBLE DEFAULT NULL,
|
||||||
`PositionZ` double default NULL,
|
PositionZ DOUBLE DEFAULT NULL,
|
||||||
`GroupPositionX` double default NULL,
|
GroupPositionX DOUBLE DEFAULT NULL,
|
||||||
`GroupPositionY` double default NULL,
|
GroupPositionY DOUBLE DEFAULT NULL,
|
||||||
`GroupPositionZ` double default NULL,
|
GroupPositionZ DOUBLE DEFAULT NULL,
|
||||||
`VelocityX` double default NULL,
|
VelocityX DOUBLE DEFAULT NULL,
|
||||||
`VelocityY` double default NULL,
|
VelocityY DOUBLE DEFAULT NULL,
|
||||||
`VelocityZ` double default NULL,
|
VelocityZ DOUBLE DEFAULT NULL,
|
||||||
`AngularVelocityX` double default NULL,
|
AngularVelocityX DOUBLE DEFAULT NULL,
|
||||||
`AngularVelocityY` double default NULL,
|
AngularVelocityY DOUBLE DEFAULT NULL,
|
||||||
`AngularVelocityZ` double default NULL,
|
AngularVelocityZ DOUBLE DEFAULT NULL,
|
||||||
`AccelerationX` double default NULL,
|
AccelerationX DOUBLE DEFAULT NULL,
|
||||||
`AccelerationY` double default NULL,
|
AccelerationY DOUBLE DEFAULT NULL,
|
||||||
`AccelerationZ` double default NULL,
|
AccelerationZ DOUBLE DEFAULT NULL,
|
||||||
`RotationX` double default NULL,
|
RotationX DOUBLE DEFAULT NULL,
|
||||||
`RotationY` double default NULL,
|
RotationY DOUBLE DEFAULT NULL,
|
||||||
`RotationZ` double default NULL,
|
RotationZ DOUBLE DEFAULT NULL,
|
||||||
`RotationW` double default NULL,
|
RotationW DOUBLE DEFAULT NULL,
|
||||||
`SitTargetOffsetX` double default NULL,
|
SitTargetOffsetX DOUBLE DEFAULT NULL,
|
||||||
`SitTargetOffsetY` double default NULL,
|
SitTargetOffsetY DOUBLE DEFAULT NULL,
|
||||||
`SitTargetOffsetZ` double default NULL,
|
SitTargetOffsetZ DOUBLE DEFAULT NULL,
|
||||||
`SitTargetOrientW` double default NULL,
|
SitTargetOrientW DOUBLE DEFAULT NULL,
|
||||||
`SitTargetOrientX` double default NULL,
|
SitTargetOrientX DOUBLE DEFAULT NULL,
|
||||||
`SitTargetOrientY` double default NULL,
|
SitTargetOrientY DOUBLE DEFAULT NULL,
|
||||||
`SitTargetOrientZ` double default NULL,
|
SitTargetOrientZ DOUBLE DEFAULT NULL,
|
||||||
-- this is the shape
|
-- this is the shape
|
||||||
`Shape` int(11) default NULL,
|
Shape INT DEFAULT NULL,
|
||||||
`ScaleX` double default NULL,
|
ScaleX DOUBLE DEFAULT NULL,
|
||||||
`ScaleY` double default NULL,
|
ScaleY DOUBLE DEFAULT NULL,
|
||||||
`ScaleZ` double default NULL,
|
ScaleZ DOUBLE DEFAULT NULL,
|
||||||
`PCode` int(11) default NULL,
|
PCode INT DEFAULT NULL,
|
||||||
`PathBegin` int(11) default NULL,
|
PathBegin INT DEFAULT NULL,
|
||||||
`PathEnd` int(11) default NULL,
|
PathEnd INT DEFAULT NULL,
|
||||||
`PathScaleX` int(11) default NULL,
|
PathScaleX INT DEFAULT NULL,
|
||||||
`PathScaleY` int(11) default NULL,
|
PathScaleY INT DEFAULT NULL,
|
||||||
`PathShearX` int(11) default NULL,
|
PathShearX INT DEFAULT NULL,
|
||||||
`PathShearY` int(11) default NULL,
|
PathShearY INT DEFAULT NULL,
|
||||||
`PathSkew` int(11) default NULL,
|
PathSkew INT DEFAULT NULL,
|
||||||
`PathCurve` int(11) default NULL,
|
PathCurve INT DEFAULT NULL,
|
||||||
`PathRadiusOffset` int(11) default NULL,
|
PathRadiusOffset INT DEFAULT NULL,
|
||||||
`PathRevolutions` int(11) default NULL,
|
PathRevolutions INT DEFAULT NULL,
|
||||||
`PathTaperX` int(11) default NULL,
|
PathTaperX INT DEFAULT NULL,
|
||||||
`PathTaperY` int(11) default NULL,
|
PathTaperY INT DEFAULT NULL,
|
||||||
`PathTwist` int(11) default NULL,
|
PathTwist INT DEFAULT NULL,
|
||||||
`PathTwistBegin` int(11) default NULL,
|
PathTwistBegin INT DEFAULT NULL,
|
||||||
`ProfileBegin` int(11) default NULL,
|
ProfileBegin INT DEFAULT NULL,
|
||||||
`ProfileEnd` int(11) default NULL,
|
ProfileEnd INT DEFAULT NULL,
|
||||||
`ProfileCurve` int(11) default NULL,
|
ProfileCurve INT DEFAULT NULL,
|
||||||
`ProfileHollow` int(11) default NULL,
|
ProfileHollow INT DEFAULT NULL,
|
||||||
`State` int(11) default NULL,
|
State INT DEFAULT NULL,
|
||||||
`Texture` longblob,
|
Texture LONGBLOB,
|
||||||
`ExtraParams` longblob,
|
ExtraParams LONGBLOB,
|
||||||
PRIMARY KEY (`UUID`),
|
PRIMARY KEY (UUID)
|
||||||
KEY `prims_regionuuid` (`RegionID`),
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||||
KEY `prims_parentuuid` (`ParentUUID`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
|
CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID);
|
||||||
|
CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID);
|
||||||
|
|
||||||
|
CREATE TABLE Terrain (
|
||||||
|
RegionID VARCHAR(36) not null,
|
||||||
|
MapData LONGBLOB,
|
||||||
|
PRIMARY KEY (RegionID)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||||
|
|
||||||
|
CREATE TABLE PrimItems (
|
||||||
|
ItemID VARCHAR(36) NOT NULL,
|
||||||
|
GroupID VARCHAR(36) DEFAULT NULL,
|
||||||
|
PrimID VARCHAR(36) DEFAULT NULL,
|
||||||
|
ParentFolderID VARCHAR(36) DEFAULT NULL,
|
||||||
|
AssetID VARCHAR(36) DEFAULT NULL,
|
||||||
|
OwnerID VARCHAR(36) DEFAULT NULL,
|
||||||
|
LastOwnerID VARCHAR(36) DEFAULT NULL,
|
||||||
|
CreatorID VARCHAR(36) DEFAULT NULL,
|
||||||
|
CreationDate BIGINT DEFAULT NULL,
|
||||||
|
InvType INT DEFAULT NULL,
|
||||||
|
Name VARCHAR(255) DEFAULT NULL,
|
||||||
|
Description VARCHAR(255) DEFAULT NULL,
|
||||||
|
NextPermissions INT DEFAULT NULL,
|
||||||
|
CurrentPermissions INT DEFAULT NULL,
|
||||||
|
BasePermissions INT DEFAULT NULL,
|
||||||
|
EveryonePermissions INT DEFAULT NULL,
|
||||||
|
GroupPermissions INT DEFAULT NULL,
|
||||||
|
Flags INT DEFAULT NULL,
|
||||||
|
PRIMARY KEY (ItemID)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||||
|
|
||||||
|
CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID);
|
||||||
|
|
||||||
|
CREATE TABLE RegionSettings (
|
||||||
|
RegionID VARCHAR(36) NOT NULL,
|
||||||
|
|
||||||
|
BlockTerraform BIT DEFAULT NULL,
|
||||||
|
BlockFly BIT DEFAULT NULL,
|
||||||
|
AllowDamage BIT DEFAULT NULL,
|
||||||
|
RestrictPushing BIT DEFAULT NULL,
|
||||||
|
AllowLandResell BIT DEFAULT NULL,
|
||||||
|
AllowLandJoinDivide BIT DEFAULT NULL,
|
||||||
|
BlockShowInSearch BIT DEFAULT NULL,
|
||||||
|
|
||||||
|
AgentLimit INT DEFAULT NULL,
|
||||||
|
ObjectBonus DOUBLE DEFAULT NULL,
|
||||||
|
Maturity INT DEFAULT NULL,
|
||||||
|
|
||||||
|
DisableScripts BIT DEFAULT NULL,
|
||||||
|
DisableCollisions BIT DEFAULT NULL,
|
||||||
|
DisablePhysics BIT DEFAULT NULL,
|
||||||
|
|
||||||
|
TerrainTexture1 VARCHAR(36) DEFAULT NULL,
|
||||||
|
TerrainTexture2 VARCHAR(36) DEFAULT NULL,
|
||||||
|
TerrainTexture3 VARCHAR(36) DEFAULT NULL,
|
||||||
|
TerrainTexture4 VARCHAR(36) DEFAULT NULL,
|
||||||
|
|
||||||
|
Elevation1NW DOUBLE DEFAULT NULL,
|
||||||
|
Elevation2NW DOUBLE DEFAULT NULL,
|
||||||
|
Elevation1NE DOUBLE DEFAULT NULL,
|
||||||
|
Elevation2NE DOUBLE DEFAULT NULL,
|
||||||
|
Elevation1SE DOUBLE DEFAULT NULL,
|
||||||
|
Elevation2SE DOUBLE DEFAULT NULL,
|
||||||
|
Elevation1SW DOUBLE DEFAULT NULL,
|
||||||
|
Elevation2SW DOUBLE DEFAULT NULL,
|
||||||
|
|
||||||
|
WaterHeight DOUBLE DEFAULT NULL,
|
||||||
|
TerrainRaiseLimit DOUBLE DEFAULT NULL,
|
||||||
|
TerrainLowerLimit DOUBLE DEFAULT NULL,
|
||||||
|
|
||||||
|
UseEstateSun BIT DEFAULT NULL,
|
||||||
|
Sandbox BIT DEFAULT NULL,
|
||||||
|
|
||||||
|
SunVectorX DOUBLE DEFAULT NULL,
|
||||||
|
SunVectorY DOUBLE DEFAULT NULL,
|
||||||
|
SunVectorZ DOUBLE DEFAULT NULL,
|
||||||
|
|
||||||
|
FixedSun BIT DEFAULT NULL,
|
||||||
|
SunPosition DOUBLE DEFAULT NULL,
|
||||||
|
|
||||||
|
Covenant VARCHAR(36) DEFAULT NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (RegionID)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||||
|
|
||||||
|
|
|
@ -1,106 +1,104 @@
|
||||||
START TRANSACTION;
|
CREATE TABLE UserAgents (
|
||||||
|
ProfileID VARCHAR(36) NOT NULL,
|
||||||
|
AgentIP VARCHAR(24) DEFAULT NULL,
|
||||||
|
AgentPort INT DEFAULT NULL,
|
||||||
|
AgentOnline BIT DEFAULT NULL,
|
||||||
|
SessionID VARCHAR(36) DEFAULT NULL,
|
||||||
|
SecureSessionID VARCHAR(36) DEFAULT NULL,
|
||||||
|
InitialRegion VARCHAR(255) DEFAULT NULL,
|
||||||
|
Region VARCHAR(255) DEFAULT NULL,
|
||||||
|
LoginTime INT DEFAULT NULL,
|
||||||
|
LogoutTime INT DEFAULT NULL,
|
||||||
|
Handle BIGINT DEFAULT NULL,
|
||||||
|
PositionX DOUBLE DEFAULT NULL,
|
||||||
|
PositionY DOUBLE DEFAULT NULL,
|
||||||
|
PositionZ DOUBLE DEFAULT NULL,
|
||||||
|
LookAtX DOUBLE DEFAULT NULL,
|
||||||
|
LookAtY DOUBLE DEFAULT NULL,
|
||||||
|
LookAtZ DOUBLE DEFAULT NULL,
|
||||||
|
PRIMARY KEY (ProfileID)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||||
|
|
||||||
CREATE TABLE `UserAgents` (
|
CREATE TABLE UserProfiles (
|
||||||
`ProfileID` varchar(36) NOT NULL,
|
ID VARCHAR(36) NOT NULL,
|
||||||
`AgentIP` varchar(24) default NULL,
|
WebLoginKey VARCHAR(36) DEFAULT NULL,
|
||||||
`AgentPort` int(11) default NULL,
|
FirstName VARCHAR(32) DEFAULT NULL,
|
||||||
`AgentOnline` tinyint(1) default NULL,
|
SurName VARCHAR(32) DEFAULT NULL,
|
||||||
`SessionID` varchar(36) default NULL,
|
Email VARCHAR(250) DEFAULT NULL,
|
||||||
`SecureSessionID` varchar(36) default NULL,
|
PasswordHash VARCHAR(32) DEFAULT NULL,
|
||||||
`InitialRegion` varchar(255) default NULL,
|
PasswordSalt VARCHAR(32) DEFAULT NULL,
|
||||||
`Region` varchar(255) default NULL,
|
HomeRegionID VARCHAR(36) DEFAULT NULL,
|
||||||
`LoginTime` int(11) default NULL,
|
HomeRegionX INT DEFAULT NULL,
|
||||||
`LogoutTime` int(11) default NULL,
|
HomeRegionY INT DEFAULT NULL,
|
||||||
`Handle` bigint(20) default NULL,
|
HomeLocationX DOUBLE DEFAULT NULL,
|
||||||
`PositionX` float default NULL,
|
HomeLocationY DOUBLE DEFAULT NULL,
|
||||||
`PositionY` float default NULL,
|
HomeLocationZ DOUBLE DEFAULT NULL,
|
||||||
`PositionZ` float default NULL,
|
HomeLookAtX DOUBLE DEFAULT NULL,
|
||||||
`LookAtX` float default NULL,
|
HomeLookAtY DOUBLE DEFAULT NULL,
|
||||||
`LookAtY` float default NULL,
|
HomeLookAtZ DOUBLE DEFAULT NULL,
|
||||||
`LookAtZ` float default NULL,
|
Created INT DEFAULT NULL,
|
||||||
PRIMARY KEY (`ProfileID`)
|
LastLogin INT DEFAULT NULL,
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
UserInventoryURI VARCHAR(255) DEFAULT NULL,
|
||||||
|
UserAssetURI VARCHAR(255) DEFAULT NULL,
|
||||||
|
Image VARCHAR(36) DEFAULT NULL,
|
||||||
|
FirstLifeImage VARCHAR(36) DEFAULT NULL,
|
||||||
|
AboutText TEXT DEFAULT NULL,
|
||||||
|
FirstLifeAboutText TEXT DEFAULT NULL,
|
||||||
|
CanDoMask INT DEFAULT NULL,
|
||||||
|
WantDoMask INT DEFAULT NULL,
|
||||||
|
UserFlags INT DEFAULT NULL,
|
||||||
|
GodLevel INT DEFAULT NULL,
|
||||||
|
CustomType VARCHAR(32) DEFAULT NULL,
|
||||||
|
Partner VARCHAR(36) DEFAULT NULL,
|
||||||
|
RootInventoryFolderID VARCHAR(36) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (ID)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||||
|
|
||||||
CREATE TABLE `UserProfiles` (
|
CREATE INDEX UserSurnameIndex ON UserProfiles (SurName);
|
||||||
`ID` varchar(36) NOT NULL,
|
CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName);
|
||||||
`WebLoginKey` varchar(36) default NULL,
|
CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName);
|
||||||
`FirstName` varchar(32) default NULL,
|
|
||||||
`SurName` varchar(32) default NULL,
|
|
||||||
`Email` varchar(250) default NULL,
|
|
||||||
`PasswordHash` varchar(32) default NULL,
|
|
||||||
`PasswordSalt` varchar(32) default NULL,
|
|
||||||
`HomeRegionID` varchar(36) default NULL,
|
|
||||||
`HomeRegionX` int(11) default NULL,
|
|
||||||
`HomeRegionY` int(11) default NULL,
|
|
||||||
`HomeLocationX` float default NULL,
|
|
||||||
`HomeLocationY` float default NULL,
|
|
||||||
`HomeLocationZ` float default NULL,
|
|
||||||
`HomeLookAtX` float default NULL,
|
|
||||||
`HomeLookAtY` float default NULL,
|
|
||||||
`HomeLookAtZ` float default NULL,
|
|
||||||
`Created` int(11) default NULL,
|
|
||||||
`LastLogin` int(11) default NULL,
|
|
||||||
`UserInventoryURI` varchar(255) default NULL,
|
|
||||||
`UserAssetURI` varchar(255) default NULL,
|
|
||||||
`Image` varchar(36) default NULL,
|
|
||||||
`FirstLifeImage` varchar(36) default NULL,
|
|
||||||
`AboutText` text default NULL,
|
|
||||||
`FirstLifeAboutText` text default NULL,
|
|
||||||
`CanDoMask` int(11) default NULL,
|
|
||||||
`WantDoMask` int(11) default NULL,
|
|
||||||
`UserFlags` int(11) default NULL,
|
|
||||||
`GodLevel` int(11) default NULL,
|
|
||||||
`CustomType` varchar(32) default NULL,
|
|
||||||
`Partner` varchar(36) default NULL,
|
|
||||||
`RootInventoryFolderID` varchar(36) default NULL,
|
|
||||||
PRIMARY KEY (`ID`),
|
|
||||||
INDEX `UserSurnameIndex` (`SurName`),
|
|
||||||
INDEX `UserFirstNameIndex` (`FirstName`),
|
|
||||||
UNIQUE INDEX `UserFullNameIndex` (`SurName`,`FirstName`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `UserAppearances` (
|
CREATE TABLE UserAppearances (
|
||||||
`Owner` varchar(36) NOT NULL,
|
Owner VARCHAR(36) NOT NULL,
|
||||||
`BodyItem` varchar(36) default NULL,
|
BodyItem VARCHAR(36) DEFAULT NULL,
|
||||||
`BodyAsset` varchar(36) default NULL,
|
BodyAsset VARCHAR(36) DEFAULT NULL,
|
||||||
`SkinItem` varchar(36) default NULL,
|
SkinItem VARCHAR(36) DEFAULT NULL,
|
||||||
`SkinAsset` varchar(36) default NULL,
|
SkinAsset VARCHAR(36) DEFAULT NULL,
|
||||||
`HairItem` varchar(36) default NULL,
|
HairItem VARCHAR(36) DEFAULT NULL,
|
||||||
`HairAsset` varchar(36) default NULL,
|
HairAsset VARCHAR(36) DEFAULT NULL,
|
||||||
`EyesItem` varchar(36) default NULL,
|
EyesItem VARCHAR(36) DEFAULT NULL,
|
||||||
`EyesAsset` varchar(36) default NULL,
|
EyesAsset VARCHAR(36) DEFAULT NULL,
|
||||||
`ShirtItem` varchar(36) default NULL,
|
ShirtItem VARCHAR(36) DEFAULT NULL,
|
||||||
`ShirtAsset` varchar(36) default NULL,
|
ShirtAsset VARCHAR(36) DEFAULT NULL,
|
||||||
`PantsItem` varchar(36) default NULL,
|
PantsItem VARCHAR(36) DEFAULT NULL,
|
||||||
`PantsAsset` varchar(36) default NULL,
|
PantsAsset VARCHAR(36) DEFAULT NULL,
|
||||||
`ShoesItem` varchar(36) default NULL,
|
ShoesItem VARCHAR(36) DEFAULT NULL,
|
||||||
`ShoesAsset` varchar(36) default NULL,
|
ShoesAsset VARCHAR(36) DEFAULT NULL,
|
||||||
`SocksItem` varchar(36) default NULL,
|
SocksItem VARCHAR(36) DEFAULT NULL,
|
||||||
`SocksAsset` varchar(36) default NULL,
|
SocksAsset VARCHAR(36) DEFAULT NULL,
|
||||||
`JacketItem` varchar(36) default NULL,
|
JacketItem VARCHAR(36) DEFAULT NULL,
|
||||||
`JacketAsset` varchar(36) default NULL,
|
JacketAsset VARCHAR(36) DEFAULT NULL,
|
||||||
`GlovesItem` varchar(36) default NULL,
|
GlovesItem VARCHAR(36) DEFAULT NULL,
|
||||||
`GlovesAsset` varchar(36) default NULL,
|
GlovesAsset VARCHAR(36) DEFAULT NULL,
|
||||||
`UnderShirtItem` varchar(36) default NULL,
|
UnderShirtItem VARCHAR(36) DEFAULT NULL,
|
||||||
`UnderShirtAsset` varchar(36) default NULL,
|
UnderShirtAsset VARCHAR(36) DEFAULT NULL,
|
||||||
`UnderPantsItem` varchar(36) default NULL,
|
UnderPantsItem VARCHAR(36) DEFAULT NULL,
|
||||||
`UnderPantsAsset` varchar(36) default NULL,
|
UnderPantsAsset VARCHAR(36) DEFAULT NULL,
|
||||||
`SkirtItem` varchar(36) default NULL,
|
SkirtItem VARCHAR(36) DEFAULT NULL,
|
||||||
`SkirtAsset` varchar(36) default NULL,
|
SkirtAsset VARCHAR(36) DEFAULT NULL,
|
||||||
`Texture` longblob,
|
Texture LONGBLOB,
|
||||||
`VisualParams` longblob,
|
VisualParams LONGBLOB,
|
||||||
`Serial` int(11) default NULL,
|
Serial INT DEFAULT NULL,
|
||||||
`AvatarHeight` float default NULL,
|
AvatarHeight FLOAT DEFAULT NULL,
|
||||||
PRIMARY KEY (`Owner`)
|
PRIMARY KEY (Owner)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||||
|
|
||||||
CREATE TABLE `UserFriends` (
|
CREATE TABLE UserFriends (
|
||||||
`UserFriendID` VARCHAR(36) NOT NULL,
|
UserFriendID VARCHAR(36) NOT NULL,
|
||||||
`OwnerID` VARCHAR(36) NOT NULL,
|
OwnerID VARCHAR(36) DEFAULT NULL,
|
||||||
`FriendID` VARCHAR(36) NOT NULL,
|
FriendID VARCHAR(36) DEFAULT NULL,
|
||||||
`FriendPermissions` INT(11) NOT NULL,
|
FriendPermissions INT DEFAULT NULL,
|
||||||
PRIMARY KEY (`UserFriendID`),
|
PRIMARY KEY (UserFriendID)
|
||||||
UNIQUE INDEX (`OwnerID`,`FriendID`)
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
COMMIT;
|
CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
BEGIN TRANSACTION;
|
CREATE TABLE Assets (
|
||||||
|
ID VARCHAR(36) NOT NULL,
|
||||||
create table Assets(
|
Type TINYINT DEFAULT NULL,
|
||||||
ID varchar(36) not null primary key,
|
Name VARCHAR(64) DEFAULT NULL,
|
||||||
Type int default 0,
|
Description VARCHAR(64) DEFAULT NULL,
|
||||||
InvType int default 0,
|
Local BIT DEFAULT NULL,
|
||||||
Name varchar(64),
|
Temporary BIT DEFAULT NULL,
|
||||||
Description varchar(64),
|
Data BLOB,
|
||||||
Local boolean,
|
PRIMARY KEY (ID)
|
||||||
Temporary boolean,
|
|
||||||
Data blob
|
|
||||||
);
|
);
|
||||||
|
|
||||||
END;
|
|
|
@ -1,38 +1,35 @@
|
||||||
BEGIN TRANSACTION;
|
CREATE TABLE Regions (
|
||||||
|
RegionId VARCHAR(36) NOT NULL,
|
||||||
create table Regions (
|
RegionHandle BIGINT UNSIGNED NOT NULL,
|
||||||
Uuid NVARCHAR(255) not null,
|
RegionName VARCHAR(32) DEFAULT NULL,
|
||||||
RegionHandle BIGINT null,
|
RegionRecvKey VARCHAR(128) DEFAULT NULL,
|
||||||
RegionName NVARCHAR(32) null,
|
RegionSendKey VARCHAR(128) DEFAULT NULL,
|
||||||
RegionRecvKey NVARCHAR(128) null,
|
RegionSecret VARCHAR(128) DEFAULT NULL,
|
||||||
RegionSendKey NVARCHAR(128) null,
|
RegionDataURI VARCHAR(255) DEFAULT NULL,
|
||||||
RegionSecret NVARCHAR(128) null,
|
ServerIP VARCHAR(64) DEFAULT NULL,
|
||||||
RegionDataURI NVARCHAR(255) null,
|
ServerPort INT UNSIGNED DEFAULT NULL,
|
||||||
ServerIP NVARCHAR(64) null,
|
ServerURI VARCHAR(255) DEFAULT NULL,
|
||||||
ServerPort INT null,
|
RegionLocX INT UNSIGNED DEFAULT NULL,
|
||||||
ServerURI NVARCHAR(255) null,
|
RegionLocY INT UNSIGNED DEFAULT NULL,
|
||||||
RegionLocX INT null,
|
RegionLocZ INT UNSIGNED DEFAULT NULL,
|
||||||
RegionLocY INT null,
|
EastOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
|
||||||
RegionLocZ INT null,
|
WestOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
|
||||||
EastOverrideHandle BIGINT null,
|
SouthOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
|
||||||
WestOverrideHandle BIGINT null,
|
NorthOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
|
||||||
SouthOverrideHandle BIGINT null,
|
RegionAssetURI VARCHAR(255) DEFAULT NULL,
|
||||||
NorthOverrideHandle BIGINT null,
|
RegionAssetRecvKey VARCHAR(128) DEFAULT NULL,
|
||||||
RegionAssetURI NVARCHAR(255) null,
|
RegionAssetSendKey VARCHAR(128) DEFAULT NULL,
|
||||||
RegionAssetRecvKey NVARCHAR(128) null,
|
RegionUserURI VARCHAR(255) DEFAULT NULL,
|
||||||
RegionAssetSendKey NVARCHAR(128) null,
|
RegionUserRecvKey VARCHAR(128) DEFAULT NULL,
|
||||||
RegionUserURI NVARCHAR(255) null,
|
RegionUserSendKey VARCHAR(128) DEFAULT NULL,
|
||||||
RegionUserRecvKey NVARCHAR(128) null,
|
regionMapTexture VARCHAR(36) DEFAULT NULL,
|
||||||
RegionUserSendKey NVARCHAR(128) null,
|
ServerHttpPort INT DEFAULT NULL,
|
||||||
ServerHttpPort INT null,
|
ServerRemotingPort INT DEFAULT NULL,
|
||||||
ServerRemotingPort INT null,
|
OwnerID VARCHAR(36) DEFAULT NULL,
|
||||||
RegionMapTextureID NVARCHAR(255) null,
|
OriginID VARCHAR(36) DEFAULT NULL,
|
||||||
Owner_uuid NVARCHAR(255) null,
|
PRIMARY KEY (uuid),
|
||||||
OriginUUID NVARCHAR(255) null,
|
|
||||||
primary key (Uuid)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
create index region_handle on Regions (RegionHandle);
|
CREATE INDEX RegionNameIndex ON Regions (RegionName);
|
||||||
create index region_name on Regions (RegionName);
|
CREATE INDEX RegionHandleIndex ON Regions (RegionHandle);
|
||||||
|
CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle);
|
||||||
COMMIT;
|
|
||||||
|
|
|
@ -1,40 +1,39 @@
|
||||||
BEGIN TRANSACTION;
|
|
||||||
|
|
||||||
CREATE TABLE InventoryFolders (
|
CREATE TABLE InventoryFolders (
|
||||||
ID varchar(36) not null primary key,
|
ID VARCHAR(36) NOT NULL,
|
||||||
Type int,
|
Type SMALLINT DEFAULT NULL,
|
||||||
Version int,
|
Version SMALLINT DEFAULT NULL,
|
||||||
ParentID varchar(36),
|
ParentID VARCHAR(36) DEFAULT NULL,
|
||||||
Owner varchar(36),
|
Owner VARCHAR(36) DEFAULT NULL,
|
||||||
Name varchar(64)
|
Name VARCHAR(64) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table InventoryItems (
|
CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner);
|
||||||
ID varchar(36) not null primary key,
|
CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID);
|
||||||
InvType int,
|
|
||||||
AssetType int,
|
CREATE TABLE InventoryItems (
|
||||||
AssetID varchar(36),
|
ID VARCHAR(36) NOT NULL,
|
||||||
Folder varchar(36),
|
InvType SMALLINT DEFAULT NULL,
|
||||||
Owner varchar(36),
|
AssetType SMALLINT DEFAULT NULL,
|
||||||
Creator varchar(36),
|
AssetID VARCHAR(36) DEFAULT NULL,
|
||||||
Name varchar(64),
|
Folder VARCHAR(36) DEFAULT NULL,
|
||||||
Description varchar(64),
|
Owner VARCHAR(36) DEFAULT NULL,
|
||||||
NextPermissions int,
|
Creator VARCHAR(36) DEFAULT NULL,
|
||||||
CurrentPermissions int,
|
Name VARCHAR(64) DEFAULT NULL,
|
||||||
BasePermissions int,
|
Description VARCHAR(64) DEFAULT NULL,
|
||||||
EveryOnePermissions int,
|
NextPermissions INT DEFAULT NULL,
|
||||||
GroupID varchar(36),
|
CurrentPermissions INT DEFAULT NULL,
|
||||||
GroupOwned int,
|
BasePermissions INT DEFAULT NULL,
|
||||||
SalePrice int,
|
EveryOnePermissions INT DEFAULT NULL,
|
||||||
SaleType int,
|
GroupID VARCHAR(36) DEFAULT NULL,
|
||||||
Flags int,
|
GroupOwned BIT DEFAULT NULL,
|
||||||
CreationDate int
|
SalePrice INT DEFAULT NULL,
|
||||||
|
SaleType TINYINT DEFAULT NULL,
|
||||||
|
Flags INT DEFAULT NULL,
|
||||||
|
CreationDate INT DEFAULT NULL,
|
||||||
|
PRIMARY KEY (ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX folder_owner_id on InventoryFolders (Owner);
|
CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID);
|
||||||
CREATE INDEX folder_parent_id on InventoryFolders (ParentID);
|
CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner);
|
||||||
CREATE INDEX item_group_id on InventoryItems (GroupID);
|
CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder);
|
||||||
CREATE INDEX item_owner_id on InventoryItems (Owner);
|
|
||||||
CREATE INDEX item_folder_id on InventoryItems (Folder);
|
|
||||||
|
|
||||||
COMMIT;
|
|
||||||
|
|
|
@ -1,150 +1,168 @@
|
||||||
BEGIN TRANSACTION;
|
CREATE TABLE Prims (
|
||||||
|
UUID VARCHAR(36) NOT NULL,
|
||||||
create table Prims (
|
RegionID VARCHAR(36) DEFAULT NULL,
|
||||||
UUID TEXT not null,
|
GroupID VARCHAR(36) DEFAULT NULL,
|
||||||
RegionID TEXT,
|
ParentID INT DEFAULT NULL,
|
||||||
GroupID TEXT,
|
ParentUUID VARCHAR(36) DEFAULT NULL,
|
||||||
ParentID INTEGER,
|
OwnerID VARCHAR(36) DEFAULT NULL,
|
||||||
ParentUUID TEXT,
|
LastOwnerID VARCHAR(36) DEFAULT NULL,
|
||||||
OwnerID TEXT,
|
CreatorID VARCHAR(36) DEFAULT NULL,
|
||||||
LastOwnerID TEXT,
|
CreationDate INT DEFAULT NULL,
|
||||||
CreatorID TEXT,
|
LinkNum INT DEFAULT NULL,
|
||||||
CreationDate INTEGER,
|
Name VARCHAR(255) DEFAULT NULL,
|
||||||
LinkNum INTEGER,
|
Text VARCHAR(255) DEFAULT NULL,
|
||||||
Name TEXT,
|
Description VARCHAR(255) DEFAULT NULL,
|
||||||
Text TEXT,
|
SitName VARCHAR(255) DEFAULT NULL,
|
||||||
Description TEXT,
|
TouchName VARCHAR(255) DEFAULT NULL,
|
||||||
SitName TEXT,
|
ObjectFlags INT DEFAULT NULL,
|
||||||
TouchName TEXT,
|
OwnerMask INT DEFAULT NULL,
|
||||||
ObjectFlags INTEGER,
|
NextOwnerMask INT DEFAULT NULL,
|
||||||
OwnerMask INTEGER,
|
GroupMask INT DEFAULT NULL,
|
||||||
NextOwnerMask INTEGER,
|
EveryoneMask INT DEFAULT NULL,
|
||||||
GroupMask INTEGER,
|
BaseMask INT DEFAULT NULL,
|
||||||
EveryoneMask INTEGER,
|
Material TINYINT DEFAULT NULL,
|
||||||
BaseMask INTEGER,
|
ScriptAccessPin INT DEFAULT NULL,
|
||||||
Material INTEGER,
|
|
||||||
ScriptAccessPin INTEGER,
|
|
||||||
TextureAnimation BLOB,
|
TextureAnimation BLOB,
|
||||||
ParticleSystem BLOB,
|
ParticleSystem BLOB,
|
||||||
ClickAction INTEGER,
|
ClickAction TINYINT DEFAULT NULL,
|
||||||
Color INTEGER,
|
Color INT DEFAULT NULL,
|
||||||
PositionX NUMERIC,
|
PositionX DOUBLE DEFAULT NULL,
|
||||||
PositionY NUMERIC,
|
PositionY DOUBLE DEFAULT NULL,
|
||||||
PositionZ NUMERIC,
|
PositionZ DOUBLE DEFAULT NULL,
|
||||||
GroupPositionX NUMERIC,
|
GroupPositionX DOUBLE DEFAULT NULL,
|
||||||
GroupPositionY NUMERIC,
|
GroupPositionY DOUBLE DEFAULT NULL,
|
||||||
GroupPositionZ NUMERIC,
|
GroupPositionZ DOUBLE DEFAULT NULL,
|
||||||
VelocityX NUMERIC,
|
VelocityX DOUBLE DEFAULT NULL,
|
||||||
VelocityY NUMERIC,
|
VelocityY DOUBLE DEFAULT NULL,
|
||||||
VelocityZ NUMERIC,
|
VelocityZ DOUBLE DEFAULT NULL,
|
||||||
AngularVelocityX NUMERIC,
|
AngularVelocityX DOUBLE DEFAULT NULL,
|
||||||
AngularVelocityY NUMERIC,
|
AngularVelocityY DOUBLE DEFAULT NULL,
|
||||||
AngularVelocityZ NUMERIC,
|
AngularVelocityZ DOUBLE DEFAULT NULL,
|
||||||
AccelerationX NUMERIC,
|
AccelerationX DOUBLE DEFAULT NULL,
|
||||||
AccelerationY NUMERIC,
|
AccelerationY DOUBLE DEFAULT NULL,
|
||||||
AccelerationZ NUMERIC,
|
AccelerationZ DOUBLE DEFAULT NULL,
|
||||||
SitTargetOffsetX NUMERIC,
|
RotationX DOUBLE DEFAULT NULL,
|
||||||
SitTargetOffsetY NUMERIC,
|
RotationY DOUBLE DEFAULT NULL,
|
||||||
SitTargetOffsetZ NUMERIC,
|
RotationZ DOUBLE DEFAULT NULL,
|
||||||
RotationX NUMERIC,
|
RotationW DOUBLE DEFAULT NULL,
|
||||||
RotationY NUMERIC,
|
SitTargetOffsetX DOUBLE DEFAULT NULL,
|
||||||
RotationZ NUMERIC,
|
SitTargetOffsetY DOUBLE DEFAULT NULL,
|
||||||
RotationW NUMERIC,
|
SitTargetOffsetZ DOUBLE DEFAULT NULL,
|
||||||
SitTargetOrientX NUMERIC,
|
SitTargetOrientW DOUBLE DEFAULT NULL,
|
||||||
SitTargetOrientY NUMERIC,
|
SitTargetOrientX DOUBLE DEFAULT NULL,
|
||||||
SitTargetOrientZ NUMERIC,
|
SitTargetOrientY DOUBLE DEFAULT NULL,
|
||||||
SitTargetOrientW NUMERIC,
|
SitTargetOrientZ DOUBLE DEFAULT NULL,
|
||||||
ScaleX NUMERIC,
|
-- this is the shape
|
||||||
ScaleY NUMERIC,
|
Shape INT DEFAULT NULL,
|
||||||
ScaleZ NUMERIC,
|
ScaleX DOUBLE DEFAULT NULL,
|
||||||
PCode INTEGER,
|
ScaleY DOUBLE DEFAULT NULL,
|
||||||
PathBegin INTEGER,
|
ScaleZ DOUBLE DEFAULT NULL,
|
||||||
PathEnd INTEGER,
|
PCode INT DEFAULT NULL,
|
||||||
PathScaleX INTEGER,
|
PathBegin INT DEFAULT NULL,
|
||||||
PathScaleY INTEGER,
|
PathEnd INT DEFAULT NULL,
|
||||||
PathShearX INTEGER,
|
PathScaleX INT DEFAULT NULL,
|
||||||
PathShearY INTEGER,
|
PathScaleY INT DEFAULT NULL,
|
||||||
PathSkew INTEGER,
|
PathShearX INT DEFAULT NULL,
|
||||||
PathCurve INTEGER,
|
PathShearY INT DEFAULT NULL,
|
||||||
PathRadiusOffset INTEGER,
|
PathSkew INT DEFAULT NULL,
|
||||||
PathRevolutions INTEGER,
|
PathCurve INT DEFAULT NULL,
|
||||||
PathTaperX INTEGER,
|
PathRadiusOffset INT DEFAULT NULL,
|
||||||
PathTwist INTEGER,
|
PathRevolutions INT DEFAULT NULL,
|
||||||
ProfileBegin INTEGER,
|
PathTaperX INT DEFAULT NULL,
|
||||||
ProfileEnd INTEGER,
|
PathTaperY INT DEFAULT NULL,
|
||||||
ProfileCurve INTEGER,
|
PathTwist INT DEFAULT NULL,
|
||||||
ProfileHollow INTEGER,
|
PathTwistBegin INT DEFAULT NULL,
|
||||||
|
ProfileBegin INT DEFAULT NULL,
|
||||||
|
ProfileEnd INT DEFAULT NULL,
|
||||||
|
ProfileCurve INT DEFAULT NULL,
|
||||||
|
ProfileHollow INT DEFAULT NULL,
|
||||||
|
State INT DEFAULT NULL,
|
||||||
Texture BLOB,
|
Texture BLOB,
|
||||||
ExtraParams BLOB,
|
ExtraParams BLOB,
|
||||||
State INTEGER,
|
PRIMARY KEY (UUID)
|
||||||
primary key (UUID)
|
|
||||||
);
|
);
|
||||||
create table Terrain (
|
|
||||||
RegionID TEXT not null,
|
CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID);
|
||||||
|
CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID);
|
||||||
|
|
||||||
|
CREATE TABLE Terrain (
|
||||||
|
RegionID VARCHAR(36) NOT NULL,
|
||||||
MapData BLOB,
|
MapData BLOB,
|
||||||
primary key (RegionID)
|
PRIMARY KEY (RegionID)
|
||||||
);
|
);
|
||||||
create table PrimItems (
|
|
||||||
ItemID TEXT not null,
|
CREATE TABLE PrimItems (
|
||||||
PrimID TEXT,
|
ItemID VARCHAR(36) NOT NULL,
|
||||||
AssetID TEXT,
|
GroupID VARCHAR(36) DEFAULT NULL,
|
||||||
ParentFolderID TEXT,
|
PrimID VARCHAR(36) DEFAULT NULL,
|
||||||
CreatorID TEXT,
|
ParentFolderID VARCHAR(36) DEFAULT NULL,
|
||||||
OwnerID TEXT,
|
AssetID VARCHAR(36) DEFAULT NULL,
|
||||||
GroupID TEXT,
|
OwnerID VARCHAR(36) DEFAULT NULL,
|
||||||
LastOwnerID TEXT,
|
LastOwnerID VARCHAR(36) DEFAULT NULL,
|
||||||
CurrentPermissions INTEGER,
|
CreatorID VARCHAR(36) DEFAULT NULL,
|
||||||
BasePermissions INTEGER,
|
CreationDate BIGINT DEFAULT NULL,
|
||||||
EveryonePermissions INTEGER,
|
InvType INT DEFAULT NULL,
|
||||||
GroupPermissions INTEGER,
|
Name VARCHAR(255) DEFAULT NULL,
|
||||||
NextPermissions INTEGER,
|
Description VARCHAR(255) DEFAULT NULL,
|
||||||
Name TEXT,
|
NextPermissions INT DEFAULT NULL,
|
||||||
Description TEXT,
|
CurrentPermissions INT DEFAULT NULL,
|
||||||
CreationDate INTEGER,
|
BasePermissions INT DEFAULT NULL,
|
||||||
Flags INTEGER,
|
EveryonePermissions INT DEFAULT NULL,
|
||||||
InvType INTEGER,
|
GroupPermissions INT DEFAULT NULL,
|
||||||
primary key (ItemID)
|
Flags INT DEFAULT NULL,
|
||||||
|
PRIMARY KEY (ItemID)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID);
|
||||||
|
|
||||||
CREATE TABLE RegionSettings (
|
CREATE TABLE RegionSettings (
|
||||||
RegionID TEXT not null,
|
RegionID VARCHAR(36) NOT NULL,
|
||||||
BlockTerraform BIT,
|
|
||||||
BlockFly BIT,
|
|
||||||
AllowDamage BIT,
|
|
||||||
RestrictPushing BIT,
|
|
||||||
AllowLandResell BIT,
|
|
||||||
AllowLandJoinDivide BIT,
|
|
||||||
BlockShowInSearch BIT,
|
|
||||||
AgentLimit INTEGER,
|
|
||||||
ObjectBonus NUMERIC,
|
|
||||||
Maturity INTEGER,
|
|
||||||
DisableScripts BIT,
|
|
||||||
DisableCollisions BIT,
|
|
||||||
DisablePhysics BIT,
|
|
||||||
TerrainTexture1 TEXT,
|
|
||||||
TerrainTexture2 TEXT,
|
|
||||||
TerrainTexture3 TEXT,
|
|
||||||
TerrainTexture4 TEXT,
|
|
||||||
Elevation1NW NUMERIC,
|
|
||||||
Elevation2NW NUMERIC,
|
|
||||||
Elevation1NE NUMERIC,
|
|
||||||
Elevation2NE NUMERIC,
|
|
||||||
Elevation1SE NUMERIC,
|
|
||||||
Elevation2SE NUMERIC,
|
|
||||||
Elevation1SW NUMERIC,
|
|
||||||
Elevation2SW NUMERIC,
|
|
||||||
WaterHeight NUMERIC,
|
|
||||||
TerrainRaiseLimit NUMERIC,
|
|
||||||
TerrainLowerLimit NUMERIC,
|
|
||||||
UseEstateSun BIT,
|
|
||||||
Sandbox BIT,
|
|
||||||
SunVectorX NUMERIC,
|
|
||||||
SunVectorY NUMERIC,
|
|
||||||
SunVectorZ NUMERIC,
|
|
||||||
FixedSun BIT,
|
|
||||||
SunPosition NUMERIC,
|
|
||||||
Covenant TEXT,
|
|
||||||
primary key (RegionID)
|
|
||||||
);
|
|
||||||
|
|
||||||
COMMIT;
|
BlockTerraform BIT DEFAULT NULL,
|
||||||
|
BlockFly BIT DEFAULT NULL,
|
||||||
|
AllowDamage BIT DEFAULT NULL,
|
||||||
|
RestrictPushing BIT DEFAULT NULL,
|
||||||
|
AllowLandResell BIT DEFAULT NULL,
|
||||||
|
AllowLandJoinDivide BIT DEFAULT NULL,
|
||||||
|
BlockShowInSearch BIT DEFAULT NULL,
|
||||||
|
|
||||||
|
AgentLimit INT DEFAULT NULL,
|
||||||
|
ObjectBonus DOUBLE DEFAULT NULL,
|
||||||
|
Maturity INT DEFAULT NULL,
|
||||||
|
|
||||||
|
DisableScripts BIT DEFAULT NULL,
|
||||||
|
DisableCollisions BIT DEFAULT NULL,
|
||||||
|
DisablePhysics BIT DEFAULT NULL,
|
||||||
|
|
||||||
|
TerrainTexture1 VARCHAR(36) DEFAULT NULL,
|
||||||
|
TerrainTexture2 VARCHAR(36) DEFAULT NULL,
|
||||||
|
TerrainTexture3 VARCHAR(36) DEFAULT NULL,
|
||||||
|
TerrainTexture4 VARCHAR(36) DEFAULT NULL,
|
||||||
|
|
||||||
|
Elevation1NW DOUBLE DEFAULT NULL,
|
||||||
|
Elevation2NW DOUBLE DEFAULT NULL,
|
||||||
|
Elevation1NE DOUBLE DEFAULT NULL,
|
||||||
|
Elevation2NE DOUBLE DEFAULT NULL,
|
||||||
|
Elevation1SE DOUBLE DEFAULT NULL,
|
||||||
|
Elevation2SE DOUBLE DEFAULT NULL,
|
||||||
|
Elevation1SW DOUBLE DEFAULT NULL,
|
||||||
|
Elevation2SW DOUBLE DEFAULT NULL,
|
||||||
|
|
||||||
|
WaterHeight DOUBLE DEFAULT NULL,
|
||||||
|
TerrainRaiseLimit DOUBLE DEFAULT NULL,
|
||||||
|
TerrainLowerLimit DOUBLE DEFAULT NULL,
|
||||||
|
|
||||||
|
UseEstateSun BIT DEFAULT NULL,
|
||||||
|
Sandbox BIT DEFAULT NULL,
|
||||||
|
|
||||||
|
SunVectorX DOUBLE DEFAULT NULL,
|
||||||
|
SunVectorY DOUBLE DEFAULT NULL,
|
||||||
|
SunVectorZ DOUBLE DEFAULT NULL,
|
||||||
|
|
||||||
|
FixedSun BIT DEFAULT NULL,
|
||||||
|
SunPosition DOUBLE DEFAULT NULL,
|
||||||
|
|
||||||
|
Covenant VARCHAR(36) DEFAULT NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (RegionID)
|
||||||
|
);
|
||||||
|
|
|
@ -1,108 +1,104 @@
|
||||||
BEGIN TRANSACTION;
|
CREATE TABLE UserAgents (
|
||||||
|
ProfileID VARCHAR(36) NOT NULL,
|
||||||
create table UserAgents (
|
AgentIP VARCHAR(24) DEFAULT NULL,
|
||||||
ProfileID TEXT not null,
|
AgentPort INT DEFAULT NULL,
|
||||||
AgentIP TEXT,
|
AgentOnline BIT DEFAULT NULL,
|
||||||
AgentPort INTEGER,
|
SessionID VARCHAR(36) DEFAULT NULL,
|
||||||
AgentOnline INTEGER,
|
SecureSessionID VARCHAR(36) DEFAULT NULL,
|
||||||
SessionID TEXT,
|
InitialRegion VARCHAR(255) DEFAULT NULL,
|
||||||
SecureSessionID TEXT,
|
Region VARCHAR(255) DEFAULT NULL,
|
||||||
InitialRegion TEXT,
|
LoginTime INT DEFAULT NULL,
|
||||||
Region TEXT,
|
LogoutTime INT DEFAULT NULL,
|
||||||
LoginTime INTEGER,
|
Handle BIGINT DEFAULT NULL,
|
||||||
LogoutTime INTEGER,
|
PositionX DOUBLE DEFAULT NULL,
|
||||||
Handle INTEGER,
|
PositionY DOUBLE DEFAULT NULL,
|
||||||
PositionX NUMERIC,
|
PositionZ DOUBLE DEFAULT NULL,
|
||||||
PositionY NUMERIC,
|
LookAtX DOUBLE DEFAULT NULL,
|
||||||
PositionZ NUMERIC,
|
LookAtY DOUBLE DEFAULT NULL,
|
||||||
LookAtX NUMERIC,
|
LookAtZ DOUBLE DEFAULT NULL,
|
||||||
LookAtY NUMERIC,
|
PRIMARY KEY (ProfileID)
|
||||||
LookAtZ NUMERIC,
|
|
||||||
primary key (ProfileID)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
create table UserProfiles (
|
CREATE TABLE UserProfiles (
|
||||||
ID TEXT not null,
|
ID VARCHAR(36) NOT NULL,
|
||||||
WebLoginKey TEXT,
|
WebLoginKey VARCHAR(36) DEFAULT NULL,
|
||||||
FirstName TEXT,
|
FirstName VARCHAR(32) DEFAULT NULL,
|
||||||
SurName TEXT,
|
SurName VARCHAR(32) DEFAULT NULL,
|
||||||
Email TEXT,
|
Email VARCHAR(250) DEFAULT NULL,
|
||||||
PasswordHash TEXT,
|
PasswordHash VARCHAR(32) DEFAULT NULL,
|
||||||
PasswordSalt TEXT,
|
PasswordSalt VARCHAR(32) DEFAULT NULL,
|
||||||
HomeRegionID TEXT,
|
HomeRegionID VARCHAR(36) DEFAULT NULL,
|
||||||
HomeRegionX INTEGER,
|
HomeRegionX INT DEFAULT NULL,
|
||||||
HomeRegionY INTEGER,
|
HomeRegionY INT DEFAULT NULL,
|
||||||
HomeLocationX NUMERIC,
|
HomeLocationX DOUBLE DEFAULT NULL,
|
||||||
HomeLocationY NUMERIC,
|
HomeLocationY DOUBLE DEFAULT NULL,
|
||||||
HomeLocationZ NUMERIC,
|
HomeLocationZ DOUBLE DEFAULT NULL,
|
||||||
HomeLookAtX NUMERIC,
|
HomeLookAtX DOUBLE DEFAULT NULL,
|
||||||
HomeLookAtY NUMERIC,
|
HomeLookAtY DOUBLE DEFAULT NULL,
|
||||||
HomeLookAtZ NUMERIC,
|
HomeLookAtZ DOUBLE DEFAULT NULL,
|
||||||
Created INTEGER,
|
Created INT DEFAULT NULL,
|
||||||
LastLogin INTEGER,
|
LastLogin INT DEFAULT NULL,
|
||||||
UserInventoryURI TEXT,
|
UserInventoryURI VARCHAR(255) DEFAULT NULL,
|
||||||
UserAssetURI TEXT,
|
UserAssetURI VARCHAR(255) DEFAULT NULL,
|
||||||
Image TEXT,
|
Image VARCHAR(36) DEFAULT NULL,
|
||||||
FirstLifeImage TEXT,
|
FirstLifeImage VARCHAR(36) DEFAULT NULL,
|
||||||
AboutText TEXT,
|
AboutText TEXT DEFAULT NULL,
|
||||||
FirstLifeAboutText TEXT,
|
FirstLifeAboutText TEXT DEFAULT NULL,
|
||||||
RootInventoryFolderID TEXT,
|
CanDoMask INT DEFAULT NULL,
|
||||||
`CanDoMask` INTEGER,
|
WantDoMask INT DEFAULT NULL,
|
||||||
`WantDoMask` INTEGER,
|
UserFlags INT DEFAULT NULL,
|
||||||
`UserFlags` INTEGER,
|
GodLevel INT DEFAULT NULL,
|
||||||
`GodLevel` INTEGER,
|
CustomType VARCHAR(32) DEFAULT NULL,
|
||||||
`CustomType` TEXT,
|
Partner VARCHAR(36) DEFAULT NULL,
|
||||||
`Partner` TEXT,
|
RootInventoryFolderID VARCHAR(36) DEFAULT NULL,
|
||||||
primary key (ID)
|
PRIMARY KEY (ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table UserAppearances (
|
CREATE INDEX UserSurnameIndex ON UserProfiles (SurName);
|
||||||
Owner TEXT not null,
|
CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName);
|
||||||
BodyItem TEXT,
|
CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName);
|
||||||
BodyAsset TEXT,
|
|
||||||
SkinItem TEXT,
|
CREATE TABLE UserAppearances (
|
||||||
SkinAsset TEXT,
|
Owner VARCHAR(36) NOT NULL,
|
||||||
HairItem TEXT,
|
BodyItem VARCHAR(36) DEFAULT NULL,
|
||||||
HairAsset TEXT,
|
BodyAsset VARCHAR(36) DEFAULT NULL,
|
||||||
EyesItem TEXT,
|
SkinItem VARCHAR(36) DEFAULT NULL,
|
||||||
EyesAsset TEXT,
|
SkinAsset VARCHAR(36) DEFAULT NULL,
|
||||||
ShirtItem TEXT,
|
HairItem VARCHAR(36) DEFAULT NULL,
|
||||||
ShirtAsset TEXT,
|
HairAsset VARCHAR(36) DEFAULT NULL,
|
||||||
PantsItem TEXT,
|
EyesItem VARCHAR(36) DEFAULT NULL,
|
||||||
PantsAsset TEXT,
|
EyesAsset VARCHAR(36) DEFAULT NULL,
|
||||||
ShoesItem TEXT,
|
ShirtItem VARCHAR(36) DEFAULT NULL,
|
||||||
ShoesAsset TEXT,
|
ShirtAsset VARCHAR(36) DEFAULT NULL,
|
||||||
SocksItem TEXT,
|
PantsItem VARCHAR(36) DEFAULT NULL,
|
||||||
SocksAsset TEXT,
|
PantsAsset VARCHAR(36) DEFAULT NULL,
|
||||||
JacketItem TEXT,
|
ShoesItem VARCHAR(36) DEFAULT NULL,
|
||||||
JacketAsset TEXT,
|
ShoesAsset VARCHAR(36) DEFAULT NULL,
|
||||||
GlovesItem TEXT,
|
SocksItem VARCHAR(36) DEFAULT NULL,
|
||||||
GlovesAsset TEXT,
|
SocksAsset VARCHAR(36) DEFAULT NULL,
|
||||||
UnderShirtItem TEXT,
|
JacketItem VARCHAR(36) DEFAULT NULL,
|
||||||
UnderShirtAsset TEXT,
|
JacketAsset VARCHAR(36) DEFAULT NULL,
|
||||||
UnderPantsItem TEXT,
|
GlovesItem VARCHAR(36) DEFAULT NULL,
|
||||||
UnderPantsAsset TEXT,
|
GlovesAsset VARCHAR(36) DEFAULT NULL,
|
||||||
SkirtItem TEXT,
|
UnderShirtItem VARCHAR(36) DEFAULT NULL,
|
||||||
SkirtAsset TEXT,
|
UnderShirtAsset VARCHAR(36) DEFAULT NULL,
|
||||||
|
UnderPantsItem VARCHAR(36) DEFAULT NULL,
|
||||||
|
UnderPantsAsset VARCHAR(36) DEFAULT NULL,
|
||||||
|
SkirtItem VARCHAR(36) DEFAULT NULL,
|
||||||
|
SkirtAsset VARCHAR(36) DEFAULT NULL,
|
||||||
Texture BLOB,
|
Texture BLOB,
|
||||||
VisualParams BLOB,
|
VisualParams BLOB,
|
||||||
Serial INTEGER,
|
Serial INT DEFAULT NULL,
|
||||||
AvatarHeight NUMERIC,
|
AvatarHeight FLOAT DEFAULT NULL,
|
||||||
primary key (Owner)
|
PRIMARY KEY (Owner)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE UserFriends (
|
CREATE TABLE UserFriends (
|
||||||
UserFriendID TEXT,
|
UserFriendID VARCHAR(36) NOT NULL,
|
||||||
OwnerID TEXT,
|
OwnerID VARCHAR(36) DEFAULT NULL,
|
||||||
FriendID TEXT,
|
FriendID VARCHAR(36) DEFAULT NULL,
|
||||||
FriendPermissions INTEGER,
|
FriendPermissions INT DEFAULT NULL,
|
||||||
primary key (UserFriendID)
|
PRIMARY KEY (UserFriendID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create index UserFirstNameIndex on UserProfiles (FirstName);
|
CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);
|
||||||
create index UserSurnameIndex on UserProfiles (SurName);
|
|
||||||
create unique index UserFullNameIndex on UserProfiles (FirstName,SurName);
|
|
||||||
create unique index UserFriendsOwnerFriendIndex on UserFriends (OwnerID,FriendID);
|
|
||||||
|
|
||||||
COMMIT;
|
|
||||||
|
|
Loading…
Reference in New Issue