aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate/Resources
diff options
context:
space:
mode:
authorCharles Krinke2009-01-12 20:14:39 +0000
committerCharles Krinke2009-01-12 20:14:39 +0000
commitc00c855cc5decf73d598af5d74a2ef57c547efd3 (patch)
tree03a6e3622db531537c2cfb47a99acd5edf4fe6b7 /OpenSim/Data/NHibernate/Resources
parent* Separate starting a client thread into a separate Start() method (which mat... (diff)
downloadopensim-SC-c00c855cc5decf73d598af5d74a2ef57c547efd3.zip
opensim-SC-c00c855cc5decf73d598af5d74a2ef57c547efd3.tar.gz
opensim-SC-c00c855cc5decf73d598af5d74a2ef57c547efd3.tar.bz2
opensim-SC-c00c855cc5decf73d598af5d74a2ef57c547efd3.tar.xz
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.
Diffstat (limited to 'OpenSim/Data/NHibernate/Resources')
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql25
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql67
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql74
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql250
-rw-r--r--OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql200
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql22
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql69
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_InventoryStore.sql69
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql306
-rw-r--r--OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql194
10 files changed, 679 insertions, 597 deletions
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql
index 3484b64..9573781 100644
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_AssetStore.sql
@@ -1,15 +1,10 @@
1START TRANSACTION; 1CREATE TABLE Assets (
2 2 ID VARCHAR(36) NOT NULL,
3CREATE TABLE `Assets` ( 3 Type TINYINT DEFAULT NULL,
4 `ID` char(36) NOT NULL, 4 Name VARCHAR(64) DEFAULT NULL,
5 `Type` smallint(6) default NULL, 5 Description VARCHAR(64) DEFAULT NULL,
6 `InvType` smallint(6) default NULL, 6 Local BIT DEFAULT NULL,
7 `Name` varchar(64) default NULL, 7 Temporary BIT DEFAULT NULL,
8 `Description` varchar(64) default NULL, 8 Data LONGBLOB,
9 `Local` tinyint(1) default NULL, 9 PRIMARY KEY (ID)
10 `Temporary` tinyint(1) default NULL, 10) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
11 `Data` longblob,
12 PRIMARY KEY (`ID`)
13) ENGINE=InnoDB DEFAULT CHARSET=utf8;
14
15COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql
index df09603..5fb1c19 100644
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_GridStore.sql
@@ -1,32 +1,35 @@
1CREATE TABLE `regions` ( 1CREATE TABLE Regions (
2 `Uuid` varchar(36) NOT NULL, 2 RegionID VARCHAR(36) NOT NULL,
3 `RegionHandle` bigint(20) unsigned NOT NULL, 3 OwnerID VARCHAR(36) DEFAULT NULL,
4 `RegionName` varchar(32) default NULL, 4 OriginID VARCHAR(36) DEFAULT NULL,
5 `RegionRecvKey` varchar(128) default NULL, 5 RegionHandle BIGINT DEFAULT NULL,
6 `RegionSendKey` varchar(128) default NULL, 6 RegionName VARCHAR(32) DEFAULT NULL,
7 `RegionSecret` varchar(128) default NULL, 7 RegionRecvKey VARCHAR(128) DEFAULT NULL,
8 `RegionDataURI` varchar(255) default NULL, 8 RegionSendKey VARCHAR(128) DEFAULT NULL,
9 `ServerIP` varchar(64) default NULL, 9 RegionSecret VARCHAR(128) DEFAULT NULL,
10 `ServerPort` int(10) unsigned default NULL, 10 RegionDataURI VARCHAR(255) DEFAULT NULL,
11 `ServerURI` varchar(255) default NULL, 11 ServerIP VARCHAR(64) DEFAULT NULL,
12 `RegionLocX` int(10) unsigned default NULL, 12 ServerPort INT DEFAULT NULL,
13 `RegionLocY` int(10) unsigned default NULL, 13 ServerURI VARCHAR(255) DEFAULT NULL,
14 `RegionLocZ` int(10) unsigned default NULL, 14 RegionLocX INT DEFAULT NULL,
15 `EastOverrideHandle` bigint(20) unsigned default NULL, 15 RegionLocY INT DEFAULT NULL,
16 `WestOverrideHandle` bigint(20) unsigned default NULL, 16 RegionLocZ INT DEFAULT NULL,
17 `SouthOverrideHandle` bigint(20) unsigned default NULL, 17 EastOverrideHandle BIGINT DEFAULT NULL,
18 `NorthOverrideHandle` bigint(20) unsigned default NULL, 18 WestOverrideHandle BIGINT DEFAULT NULL,
19 `RegionAssetURI` varchar(255) default NULL, 19 SouthOverrideHandle BIGINT DEFAULT NULL,
20 `RegionAssetRecvKey` varchar(128) default NULL, 20 NorthOverrideHandle BIGINT DEFAULT NULL,
21 `RegionAssetSendKey` varchar(128) default NULL, 21 RegionAssetURI VARCHAR(255) DEFAULT NULL,
22 `RegionUserURI` varchar(255) default NULL, 22 RegionAssetRecvKey VARCHAR(128) DEFAULT NULL,
23 `RegionUserRecvKey` varchar(128) default NULL, 23 RegionAssetSendKey VARCHAR(128) DEFAULT NULL,
24 `RegionUserSendKey` varchar(128) default NULL, `regionMapTexture` varchar(36) default NULL, 24 RegionUserURI VARCHAR(255) DEFAULT NULL,
25 `ServerHttpPort` int(10) default NULL, `serverRemotingPort` int(10) default NULL, 25 RegionUserRecvKey VARCHAR(128) DEFAULT NULL,
26 `Owner_uuid` varchar(36) default '00000000-0000-0000-0000-000000000000' not null, 26 RegionUserSendKey VARCHAR(128) DEFAULT NULL,
27 `OriginUUID` varchar(36), 27 RegionMapTexture VARCHAR(36) DEFAULT NULL,
28 PRIMARY KEY (`uuid`), 28 ServerHttpPort INT DEFAULT NULL,
29 KEY `region_name` (`RegionName`), 29 ServerRemotingPort INT DEFAULT NULL,
30 KEY `region_handle` (`RegionHandle`), 30 PRIMARY KEY (uuid),
31 KEY `overrideHandles` (`EastOverrideHandle`,`WestOverrideHandle`,`SouthOverrideHandle`,`NorthOverrideHandle`) 31) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
32) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Rev. 3'; \ No newline at end of file 32
33CREATE INDEX RegionNameIndex ON Regions (RegionName);
34CREATE INDEX RegionHandleIndex ON Regions (RegionHandle);
35CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle);
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql
index 80afaa0..13d8cf6 100644
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_InventoryStore.sql
@@ -1,41 +1,39 @@
1START TRANSACTION; 1CREATE TABLE InventoryFolders (
2 ID VARCHAR(36) NOT NULL,
3 Type SMALLINT DEFAULT NULL,
4 Version SMALLINT DEFAULT NULL,
5 ParentID VARCHAR(36) DEFAULT NULL,
6 Owner VARCHAR(36) DEFAULT NULL,
7 Name VARCHAR(64) DEFAULT NULL,
8 PRIMARY KEY (ID)
9) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
2 10
3CREATE TABLE `InventoryFolders` ( 11CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner);
4 `ID` char(36) NOT NULL, 12CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID);
5 `Type` int(11) default NULL,
6 `Version` int(11) default NULL,
7 `ParentID` char(36) default NULL,
8 `Owner` char(36) default NULL,
9 `Name` varchar(64) default NULL,
10 PRIMARY KEY (`ID`),
11 KEY `folder_owner_id` (`Owner`),
12 KEY `folder_parent_id` (`ParentID`)
13) ENGINE=InnoDB DEFAULT CHARSET=utf8;
14 13
15CREATE TABLE `InventoryItems` ( 14CREATE TABLE InventoryItems (
16 `ID` char(36) NOT NULL, 15 ID VARCHAR(36) NOT NULL,
17 `InvType` smallint(6) default NULL, 16 InvType SMALLINT DEFAULT NULL,
18 `AssetType` smallint(6) default NULL, 17 AssetType SMALLINT DEFAULT NULL,
19 `AssetID` char(36) default NULL, 18 AssetID VARCHAR(36) DEFAULT NULL,
20 `Folder` char(36) default NULL, 19 Folder VARCHAR(36) DEFAULT NULL,
21 `Owner` char(36) default NULL, 20 Owner VARCHAR(36) DEFAULT NULL,
22 `Creator` char(36) default NULL, 21 Creator VARCHAR(36) DEFAULT NULL,
23 `Name` varchar(64) default NULL, 22 Name VARCHAR(64) DEFAULT NULL,
24 `Description` varchar(64) default NULL, 23 Description VARCHAR(64) DEFAULT NULL,
25 `NextPermissions` int(11) default NULL, 24 NextPermissions INT DEFAULT NULL,
26 `CurrentPermissions` int(11) default NULL, 25 CurrentPermissions INT DEFAULT NULL,
27 `BasePermissions` int(11) default NULL, 26 BasePermissions INT DEFAULT NULL,
28 `EveryOnePermissions` int(11) default NULL, 27 EveryOnePermissions INT DEFAULT NULL,
29 `GroupID` char(36) default NULL, 28 GroupID VARCHAR(36) DEFAULT NULL,
30 `GroupOwned` tinyint(1) default NULL, 29 GroupOwned BIT DEFAULT NULL,
31 `SalePrice` int(11) default NULL, 30 SalePrice INT DEFAULT NULL,
32 `SaleType` smallint(6) default NULL, 31 SaleType TINYINT DEFAULT NULL,
33 `Flags` int(11) default NULL, 32 Flags INT DEFAULT NULL,
34 `CreationDate` int(11) default NULL, 33 CreationDate INT DEFAULT NULL,
35 PRIMARY KEY (`ID`), 34 PRIMARY KEY (ID)
36 KEY `item_group_id` (`GroupID`), 35) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
37 KEY `item_owner_id` (`Owner`),
38 KEY `item_folder_id` (`Folder`)
39) ENGINE=InnoDB DEFAULT CHARSET=utf8;
40 36
41COMMIT; \ No newline at end of file 37CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID);
38CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner);
39CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder);
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql
index 158ebb4..e44f012 100644
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql
@@ -1,87 +1,169 @@
1CREATE TABLE `Prims` ( 1CREATE TABLE Prims (
2 `UUID` char(36) NOT NULL default '', 2 UUID VARCHAR(36) NOT NULL,
3 `RegionID` char(36) default NULL, 3 RegionID VARCHAR(36) DEFAULT NULL,
4 `GroupID` char(36) default NULL, 4 GroupID VARCHAR(36) DEFAULT NULL,
5 `ParentID` int(11) default NULL, 5 ParentID INT DEFAULT NULL,
6 `ParentUUID` char(36) default NULL, 6 ParentUUID VARCHAR(36) DEFAULT NULL,
7 `OwnerID` char(36) default NULL, 7 OwnerID VARCHAR(36) DEFAULT NULL,
8 `LastOwnerID` char(36) default NULL, 8 LastOwnerID VARCHAR(36) DEFAULT NULL,
9 `CreatorID` char(36) default NULL, 9 CreatorID VARCHAR(36) DEFAULT NULL,
10 `CreationDate` int(11) default NULL, 10 CreationDate INT DEFAULT NULL,
11 `LinkNum` int(11) default NULL, 11 LinkNum INT DEFAULT NULL,
12 `Name` varchar(255) default NULL, 12 Name VARCHAR(255) DEFAULT NULL,
13 `Text` varchar(255) default NULL, 13 Text VARCHAR(255) DEFAULT NULL,
14 `Description` varchar(255) default NULL, 14 Description VARCHAR(255) DEFAULT NULL,
15 `SitName` varchar(255) default NULL, 15 SitName VARCHAR(255) DEFAULT NULL,
16 `TouchName` varchar(255) default NULL, 16 TouchName VARCHAR(255) DEFAULT NULL,
17 `ObjectFlags` int(11) default NULL, 17 ObjectFlags INT DEFAULT NULL,
18 `OwnerMask` int(11) default NULL, 18 OwnerMask INT DEFAULT NULL,
19 `NextOwnerMask` int(11) default NULL, 19 NextOwnerMask INT DEFAULT NULL,
20 `GroupMask` int(11) default NULL, 20 GroupMask INT DEFAULT NULL,
21 `EveryoneMask` int(11) default NULL, 21 EveryoneMask INT DEFAULT NULL,
22 `BaseMask` int(11) default NULL, 22 BaseMask INT DEFAULT NULL,
23 `Material` int(1) default NULL, 23 Material TINYINT DEFAULT NULL,
24 `ScriptAccessPin` int(11) default NULL, 24 ScriptAccessPin INT DEFAULT NULL,
25 `TextureAnimation` blob, 25 TextureAnimation BLOB,
26 `ParticleSystem` blob, 26 ParticleSystem BLOB,
27 `ClickAction` int(1) default NULL, 27 ClickAction TINYINT DEFAULT NULL,
28 `Color` int(11) default NULL, 28 Color INT DEFAULT NULL,
29 `PositionX` double default NULL, 29 PositionX DOUBLE DEFAULT NULL,
30 `PositionY` double default NULL, 30 PositionY DOUBLE DEFAULT NULL,
31 `PositionZ` double default NULL, 31 PositionZ DOUBLE DEFAULT NULL,
32 `GroupPositionX` double default NULL, 32 GroupPositionX DOUBLE DEFAULT NULL,
33 `GroupPositionY` double default NULL, 33 GroupPositionY DOUBLE DEFAULT NULL,
34 `GroupPositionZ` double default NULL, 34 GroupPositionZ DOUBLE DEFAULT NULL,
35 `VelocityX` double default NULL, 35 VelocityX DOUBLE DEFAULT NULL,
36 `VelocityY` double default NULL, 36 VelocityY DOUBLE DEFAULT NULL,
37 `VelocityZ` double default NULL, 37 VelocityZ DOUBLE DEFAULT NULL,
38 `AngularVelocityX` double default NULL, 38 AngularVelocityX DOUBLE DEFAULT NULL,
39 `AngularVelocityY` double default NULL, 39 AngularVelocityY DOUBLE DEFAULT NULL,
40 `AngularVelocityZ` double default NULL, 40 AngularVelocityZ DOUBLE DEFAULT NULL,
41 `AccelerationX` double default NULL, 41 AccelerationX DOUBLE DEFAULT NULL,
42 `AccelerationY` double default NULL, 42 AccelerationY DOUBLE DEFAULT NULL,
43 `AccelerationZ` double default NULL, 43 AccelerationZ DOUBLE DEFAULT NULL,
44 `RotationX` double default NULL, 44 RotationX DOUBLE DEFAULT NULL,
45 `RotationY` double default NULL, 45 RotationY DOUBLE DEFAULT NULL,
46 `RotationZ` double default NULL, 46 RotationZ DOUBLE DEFAULT NULL,
47 `RotationW` double default NULL, 47 RotationW DOUBLE DEFAULT NULL,
48 `SitTargetOffsetX` double default NULL, 48 SitTargetOffsetX DOUBLE DEFAULT NULL,
49 `SitTargetOffsetY` double default NULL, 49 SitTargetOffsetY DOUBLE DEFAULT NULL,
50 `SitTargetOffsetZ` double default NULL, 50 SitTargetOffsetZ DOUBLE DEFAULT NULL,
51 `SitTargetOrientW` double default NULL, 51 SitTargetOrientW DOUBLE DEFAULT NULL,
52 `SitTargetOrientX` double default NULL, 52 SitTargetOrientX DOUBLE DEFAULT NULL,
53 `SitTargetOrientY` double default NULL, 53 SitTargetOrientY DOUBLE DEFAULT NULL,
54 `SitTargetOrientZ` double default NULL, 54 SitTargetOrientZ DOUBLE DEFAULT NULL,
55 -- this is the shape 55 -- this is the shape
56 `Shape` int(11) default NULL, 56 Shape INT DEFAULT NULL,
57 `ScaleX` double default NULL, 57 ScaleX DOUBLE DEFAULT NULL,
58 `ScaleY` double default NULL, 58 ScaleY DOUBLE DEFAULT NULL,
59 `ScaleZ` double default NULL, 59 ScaleZ DOUBLE DEFAULT NULL,
60 `PCode` int(11) default NULL, 60 PCode INT DEFAULT NULL,
61 `PathBegin` int(11) default NULL, 61 PathBegin INT DEFAULT NULL,
62 `PathEnd` int(11) default NULL, 62 PathEnd INT DEFAULT NULL,
63 `PathScaleX` int(11) default NULL, 63 PathScaleX INT DEFAULT NULL,
64 `PathScaleY` int(11) default NULL, 64 PathScaleY INT DEFAULT NULL,
65 `PathShearX` int(11) default NULL, 65 PathShearX INT DEFAULT NULL,
66 `PathShearY` int(11) default NULL, 66 PathShearY INT DEFAULT NULL,
67 `PathSkew` int(11) default NULL, 67 PathSkew INT DEFAULT NULL,
68 `PathCurve` int(11) default NULL, 68 PathCurve INT DEFAULT NULL,
69 `PathRadiusOffset` int(11) default NULL, 69 PathRadiusOffset INT DEFAULT NULL,
70 `PathRevolutions` int(11) default NULL, 70 PathRevolutions INT DEFAULT NULL,
71 `PathTaperX` int(11) default NULL, 71 PathTaperX INT DEFAULT NULL,
72 `PathTaperY` int(11) default NULL, 72 PathTaperY INT DEFAULT NULL,
73 `PathTwist` int(11) default NULL, 73 PathTwist INT DEFAULT NULL,
74 `PathTwistBegin` int(11) default NULL, 74 PathTwistBegin INT DEFAULT NULL,
75 `ProfileBegin` int(11) default NULL, 75 ProfileBegin INT DEFAULT NULL,
76 `ProfileEnd` int(11) default NULL, 76 ProfileEnd INT DEFAULT NULL,
77 `ProfileCurve` int(11) default NULL, 77 ProfileCurve INT DEFAULT NULL,
78 `ProfileHollow` int(11) default NULL, 78 ProfileHollow INT DEFAULT NULL,
79 `State` int(11) default NULL, 79 State INT DEFAULT NULL,
80 `Texture` longblob, 80 Texture LONGBLOB,
81 `ExtraParams` longblob, 81 ExtraParams LONGBLOB,
82 PRIMARY KEY (`UUID`), 82 PRIMARY KEY (UUID)
83 KEY `prims_regionuuid` (`RegionID`), 83) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
84 KEY `prims_parentuuid` (`ParentUUID`)
85) ENGINE=InnoDB DEFAULT CHARSET=utf8;
86 84
85CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID);
86CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID);
87
88CREATE TABLE Terrain (
89 RegionID VARCHAR(36) not null,
90 MapData LONGBLOB,
91 PRIMARY KEY (RegionID)
92) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
93
94CREATE TABLE PrimItems (
95 ItemID VARCHAR(36) NOT NULL,
96 GroupID VARCHAR(36) DEFAULT NULL,
97 PrimID VARCHAR(36) DEFAULT NULL,
98 ParentFolderID VARCHAR(36) DEFAULT NULL,
99 AssetID VARCHAR(36) DEFAULT NULL,
100 OwnerID VARCHAR(36) DEFAULT NULL,
101 LastOwnerID VARCHAR(36) DEFAULT NULL,
102 CreatorID VARCHAR(36) DEFAULT NULL,
103 CreationDate BIGINT DEFAULT NULL,
104 InvType INT DEFAULT NULL,
105 Name VARCHAR(255) DEFAULT NULL,
106 Description VARCHAR(255) DEFAULT NULL,
107 NextPermissions INT DEFAULT NULL,
108 CurrentPermissions INT DEFAULT NULL,
109 BasePermissions INT DEFAULT NULL,
110 EveryonePermissions INT DEFAULT NULL,
111 GroupPermissions INT DEFAULT NULL,
112 Flags INT DEFAULT NULL,
113 PRIMARY KEY (ItemID)
114) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
115
116CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID);
117
118CREATE TABLE RegionSettings (
119 RegionID VARCHAR(36) NOT NULL,
120
121 BlockTerraform BIT DEFAULT NULL,
122 BlockFly BIT DEFAULT NULL,
123 AllowDamage BIT DEFAULT NULL,
124 RestrictPushing BIT DEFAULT NULL,
125 AllowLandResell BIT DEFAULT NULL,
126 AllowLandJoinDivide BIT DEFAULT NULL,
127 BlockShowInSearch BIT DEFAULT NULL,
128
129 AgentLimit INT DEFAULT NULL,
130 ObjectBonus DOUBLE DEFAULT NULL,
131 Maturity INT DEFAULT NULL,
132
133 DisableScripts BIT DEFAULT NULL,
134 DisableCollisions BIT DEFAULT NULL,
135 DisablePhysics BIT DEFAULT NULL,
136
137 TerrainTexture1 VARCHAR(36) DEFAULT NULL,
138 TerrainTexture2 VARCHAR(36) DEFAULT NULL,
139 TerrainTexture3 VARCHAR(36) DEFAULT NULL,
140 TerrainTexture4 VARCHAR(36) DEFAULT NULL,
141
142 Elevation1NW DOUBLE DEFAULT NULL,
143 Elevation2NW DOUBLE DEFAULT NULL,
144 Elevation1NE DOUBLE DEFAULT NULL,
145 Elevation2NE DOUBLE DEFAULT NULL,
146 Elevation1SE DOUBLE DEFAULT NULL,
147 Elevation2SE DOUBLE DEFAULT NULL,
148 Elevation1SW DOUBLE DEFAULT NULL,
149 Elevation2SW DOUBLE DEFAULT NULL,
150
151 WaterHeight DOUBLE DEFAULT NULL,
152 TerrainRaiseLimit DOUBLE DEFAULT NULL,
153 TerrainLowerLimit DOUBLE DEFAULT NULL,
154
155 UseEstateSun BIT DEFAULT NULL,
156 Sandbox BIT DEFAULT NULL,
157
158 SunVectorX DOUBLE DEFAULT NULL,
159 SunVectorY DOUBLE DEFAULT NULL,
160 SunVectorZ DOUBLE DEFAULT NULL,
161
162 FixedSun BIT DEFAULT NULL,
163 SunPosition DOUBLE DEFAULT NULL,
164
165 Covenant VARCHAR(36) DEFAULT NULL,
166
167 PRIMARY KEY (RegionID)
168) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
87 169
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql
index a66f5b8..140aea4 100644
--- a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_UserStore.sql
@@ -1,106 +1,104 @@
1START TRANSACTION; 1CREATE TABLE UserAgents (
2 ProfileID VARCHAR(36) NOT NULL,
3 AgentIP VARCHAR(24) DEFAULT NULL,
4 AgentPort INT DEFAULT NULL,
5 AgentOnline BIT DEFAULT NULL,
6 SessionID VARCHAR(36) DEFAULT NULL,
7 SecureSessionID VARCHAR(36) DEFAULT NULL,
8 InitialRegion VARCHAR(255) DEFAULT NULL,
9 Region VARCHAR(255) DEFAULT NULL,
10 LoginTime INT DEFAULT NULL,
11 LogoutTime INT DEFAULT NULL,
12 Handle BIGINT DEFAULT NULL,
13 PositionX DOUBLE DEFAULT NULL,
14 PositionY DOUBLE DEFAULT NULL,
15 PositionZ DOUBLE DEFAULT NULL,
16 LookAtX DOUBLE DEFAULT NULL,
17 LookAtY DOUBLE DEFAULT NULL,
18 LookAtZ DOUBLE DEFAULT NULL,
19 PRIMARY KEY (ProfileID)
20) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
2 21
3CREATE TABLE `UserAgents` ( 22CREATE TABLE UserProfiles (
4 `ProfileID` varchar(36) NOT NULL, 23 ID VARCHAR(36) NOT NULL,
5 `AgentIP` varchar(24) default NULL, 24 WebLoginKey VARCHAR(36) DEFAULT NULL,
6 `AgentPort` int(11) default NULL, 25 FirstName VARCHAR(32) DEFAULT NULL,
7 `AgentOnline` tinyint(1) default NULL, 26 SurName VARCHAR(32) DEFAULT NULL,
8 `SessionID` varchar(36) default NULL, 27 Email VARCHAR(250) DEFAULT NULL,
9 `SecureSessionID` varchar(36) default NULL, 28 PasswordHash VARCHAR(32) DEFAULT NULL,
10 `InitialRegion` varchar(255) default NULL, 29 PasswordSalt VARCHAR(32) DEFAULT NULL,
11 `Region` varchar(255) default NULL, 30 HomeRegionID VARCHAR(36) DEFAULT NULL,
12 `LoginTime` int(11) default NULL, 31 HomeRegionX INT DEFAULT NULL,
13 `LogoutTime` int(11) default NULL, 32 HomeRegionY INT DEFAULT NULL,
14 `Handle` bigint(20) default NULL, 33 HomeLocationX DOUBLE DEFAULT NULL,
15 `PositionX` float default NULL, 34 HomeLocationY DOUBLE DEFAULT NULL,
16 `PositionY` float default NULL, 35 HomeLocationZ DOUBLE DEFAULT NULL,
17 `PositionZ` float default NULL, 36 HomeLookAtX DOUBLE DEFAULT NULL,
18 `LookAtX` float default NULL, 37 HomeLookAtY DOUBLE DEFAULT NULL,
19 `LookAtY` float default NULL, 38 HomeLookAtZ DOUBLE DEFAULT NULL,
20 `LookAtZ` float default NULL, 39 Created INT DEFAULT NULL,
21 PRIMARY KEY (`ProfileID`) 40 LastLogin INT DEFAULT NULL,
22) ENGINE=InnoDB DEFAULT CHARSET=utf8; 41 UserInventoryURI VARCHAR(255) DEFAULT NULL,
42 UserAssetURI VARCHAR(255) DEFAULT NULL,
43 Image VARCHAR(36) DEFAULT NULL,
44 FirstLifeImage VARCHAR(36) DEFAULT NULL,
45 AboutText TEXT DEFAULT NULL,
46 FirstLifeAboutText TEXT DEFAULT NULL,
47 CanDoMask INT DEFAULT NULL,
48 WantDoMask INT DEFAULT NULL,
49 UserFlags INT DEFAULT NULL,
50 GodLevel INT DEFAULT NULL,
51 CustomType VARCHAR(32) DEFAULT NULL,
52 Partner VARCHAR(36) DEFAULT NULL,
53 RootInventoryFolderID VARCHAR(36) DEFAULT NULL,
54 PRIMARY KEY (ID)
55) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
23 56
24CREATE TABLE `UserProfiles` ( 57CREATE INDEX UserSurnameIndex ON UserProfiles (SurName);
25 `ID` varchar(36) NOT NULL, 58CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName);
26 `WebLoginKey` varchar(36) default NULL, 59CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName);
27 `FirstName` varchar(32) default NULL,
28 `SurName` varchar(32) default NULL,
29 `Email` varchar(250) default NULL,
30 `PasswordHash` varchar(32) default NULL,
31 `PasswordSalt` varchar(32) default NULL,
32 `HomeRegionID` varchar(36) default NULL,
33 `HomeRegionX` int(11) default NULL,
34 `HomeRegionY` int(11) default NULL,
35 `HomeLocationX` float default NULL,
36 `HomeLocationY` float default NULL,
37 `HomeLocationZ` float default NULL,
38 `HomeLookAtX` float default NULL,
39 `HomeLookAtY` float default NULL,
40 `HomeLookAtZ` float default NULL,
41 `Created` int(11) default NULL,
42 `LastLogin` int(11) default NULL,
43 `UserInventoryURI` varchar(255) default NULL,
44 `UserAssetURI` varchar(255) default NULL,
45 `Image` varchar(36) default NULL,
46 `FirstLifeImage` varchar(36) default NULL,
47 `AboutText` text default NULL,
48 `FirstLifeAboutText` text default NULL,
49 `CanDoMask` int(11) default NULL,
50 `WantDoMask` int(11) default NULL,
51 `UserFlags` int(11) default NULL,
52 `GodLevel` int(11) default NULL,
53 `CustomType` varchar(32) default NULL,
54 `Partner` varchar(36) default NULL,
55 `RootInventoryFolderID` varchar(36) default NULL,
56 PRIMARY KEY (`ID`),
57 INDEX `UserSurnameIndex` (`SurName`),
58 INDEX `UserFirstNameIndex` (`FirstName`),
59 UNIQUE INDEX `UserFullNameIndex` (`SurName`,`FirstName`)
60) ENGINE=InnoDB DEFAULT CHARSET=utf8;
61 60
62CREATE TABLE `UserAppearances` ( 61CREATE TABLE UserAppearances (
63 `Owner` varchar(36) NOT NULL, 62 Owner VARCHAR(36) NOT NULL,
64 `BodyItem` varchar(36) default NULL, 63 BodyItem VARCHAR(36) DEFAULT NULL,
65 `BodyAsset` varchar(36) default NULL, 64 BodyAsset VARCHAR(36) DEFAULT NULL,
66 `SkinItem` varchar(36) default NULL, 65 SkinItem VARCHAR(36) DEFAULT NULL,
67 `SkinAsset` varchar(36) default NULL, 66 SkinAsset VARCHAR(36) DEFAULT NULL,
68 `HairItem` varchar(36) default NULL, 67 HairItem VARCHAR(36) DEFAULT NULL,
69 `HairAsset` varchar(36) default NULL, 68 HairAsset VARCHAR(36) DEFAULT NULL,
70 `EyesItem` varchar(36) default NULL, 69 EyesItem VARCHAR(36) DEFAULT NULL,
71 `EyesAsset` varchar(36) default NULL, 70 EyesAsset VARCHAR(36) DEFAULT NULL,
72 `ShirtItem` varchar(36) default NULL, 71 ShirtItem VARCHAR(36) DEFAULT NULL,
73 `ShirtAsset` varchar(36) default NULL, 72 ShirtAsset VARCHAR(36) DEFAULT NULL,
74 `PantsItem` varchar(36) default NULL, 73 PantsItem VARCHAR(36) DEFAULT NULL,
75 `PantsAsset` varchar(36) default NULL, 74 PantsAsset VARCHAR(36) DEFAULT NULL,
76 `ShoesItem` varchar(36) default NULL, 75 ShoesItem VARCHAR(36) DEFAULT NULL,
77 `ShoesAsset` varchar(36) default NULL, 76 ShoesAsset VARCHAR(36) DEFAULT NULL,
78 `SocksItem` varchar(36) default NULL, 77 SocksItem VARCHAR(36) DEFAULT NULL,
79 `SocksAsset` varchar(36) default NULL, 78 SocksAsset VARCHAR(36) DEFAULT NULL,
80 `JacketItem` varchar(36) default NULL, 79 JacketItem VARCHAR(36) DEFAULT NULL,
81 `JacketAsset` varchar(36) default NULL, 80 JacketAsset VARCHAR(36) DEFAULT NULL,
82 `GlovesItem` varchar(36) default NULL, 81 GlovesItem VARCHAR(36) DEFAULT NULL,
83 `GlovesAsset` varchar(36) default NULL, 82 GlovesAsset VARCHAR(36) DEFAULT NULL,
84 `UnderShirtItem` varchar(36) default NULL, 83 UnderShirtItem VARCHAR(36) DEFAULT NULL,
85 `UnderShirtAsset` varchar(36) default NULL, 84 UnderShirtAsset VARCHAR(36) DEFAULT NULL,
86 `UnderPantsItem` varchar(36) default NULL, 85 UnderPantsItem VARCHAR(36) DEFAULT NULL,
87 `UnderPantsAsset` varchar(36) default NULL, 86 UnderPantsAsset VARCHAR(36) DEFAULT NULL,
88 `SkirtItem` varchar(36) default NULL, 87 SkirtItem VARCHAR(36) DEFAULT NULL,
89 `SkirtAsset` varchar(36) default NULL, 88 SkirtAsset VARCHAR(36) DEFAULT NULL,
90 `Texture` longblob, 89 Texture LONGBLOB,
91 `VisualParams` longblob, 90 VisualParams LONGBLOB,
92 `Serial` int(11) default NULL, 91 Serial INT DEFAULT NULL,
93 `AvatarHeight` float default NULL, 92 AvatarHeight FLOAT DEFAULT NULL,
94 PRIMARY KEY (`Owner`) 93 PRIMARY KEY (Owner)
95) ENGINE=InnoDB DEFAULT CHARSET=utf8; 94) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
96 95
97CREATE TABLE `UserFriends` ( 96CREATE TABLE UserFriends (
98 `UserFriendID` VARCHAR(36) NOT NULL, 97 UserFriendID VARCHAR(36) NOT NULL,
99 `OwnerID` VARCHAR(36) NOT NULL, 98 OwnerID VARCHAR(36) DEFAULT NULL,
100 `FriendID` VARCHAR(36) NOT NULL, 99 FriendID VARCHAR(36) DEFAULT NULL,
101 `FriendPermissions` INT(11) NOT NULL, 100 FriendPermissions INT DEFAULT NULL,
102 PRIMARY KEY (`UserFriendID`), 101 PRIMARY KEY (UserFriendID)
103 UNIQUE INDEX (`OwnerID`,`FriendID`) 102) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
104) ENGINE=InnoDB DEFAULT CHARSET=utf8;
105 103
106COMMIT; 104CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql
index 07994f4..15e10b3 100644
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_AssetStore.sql
@@ -1,14 +1,10 @@
1BEGIN TRANSACTION; 1CREATE TABLE Assets (
2 2 ID VARCHAR(36) NOT NULL,
3create table Assets( 3 Type TINYINT DEFAULT NULL,
4 ID varchar(36) not null primary key, 4 Name VARCHAR(64) DEFAULT NULL,
5 Type int default 0, 5 Description VARCHAR(64) DEFAULT NULL,
6 InvType int default 0, 6 Local BIT DEFAULT NULL,
7 Name varchar(64), 7 Temporary BIT DEFAULT NULL,
8 Description varchar(64), 8 Data BLOB,
9 Local boolean, 9 PRIMARY KEY (ID)
10 Temporary boolean,
11 Data blob
12); 10);
13
14END; \ No newline at end of file
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql
index 1cb18e3..336a277 100644
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_GridStore.sql
@@ -1,38 +1,35 @@
1BEGIN TRANSACTION; 1CREATE TABLE Regions (
2 2 RegionId VARCHAR(36) NOT NULL,
3create table Regions ( 3 RegionHandle BIGINT UNSIGNED NOT NULL,
4 Uuid NVARCHAR(255) not null, 4 RegionName VARCHAR(32) DEFAULT NULL,
5 RegionHandle BIGINT null, 5 RegionRecvKey VARCHAR(128) DEFAULT NULL,
6 RegionName NVARCHAR(32) null, 6 RegionSendKey VARCHAR(128) DEFAULT NULL,
7 RegionRecvKey NVARCHAR(128) null, 7 RegionSecret VARCHAR(128) DEFAULT NULL,
8 RegionSendKey NVARCHAR(128) null, 8 RegionDataURI VARCHAR(255) DEFAULT NULL,
9 RegionSecret NVARCHAR(128) null, 9 ServerIP VARCHAR(64) DEFAULT NULL,
10 RegionDataURI NVARCHAR(255) null, 10 ServerPort INT UNSIGNED DEFAULT NULL,
11 ServerIP NVARCHAR(64) null, 11 ServerURI VARCHAR(255) DEFAULT NULL,
12 ServerPort INT null, 12 RegionLocX INT UNSIGNED DEFAULT NULL,
13 ServerURI NVARCHAR(255) null, 13 RegionLocY INT UNSIGNED DEFAULT NULL,
14 RegionLocX INT null, 14 RegionLocZ INT UNSIGNED DEFAULT NULL,
15 RegionLocY INT null, 15 EastOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
16 RegionLocZ INT null, 16 WestOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
17 EastOverrideHandle BIGINT null, 17 SouthOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
18 WestOverrideHandle BIGINT null, 18 NorthOverrideHandle BIGINT UNSIGNED DEFAULT NULL,
19 SouthOverrideHandle BIGINT null, 19 RegionAssetURI VARCHAR(255) DEFAULT NULL,
20 NorthOverrideHandle BIGINT null, 20 RegionAssetRecvKey VARCHAR(128) DEFAULT NULL,
21 RegionAssetURI NVARCHAR(255) null, 21 RegionAssetSendKey VARCHAR(128) DEFAULT NULL,
22 RegionAssetRecvKey NVARCHAR(128) null, 22 RegionUserURI VARCHAR(255) DEFAULT NULL,
23 RegionAssetSendKey NVARCHAR(128) null, 23 RegionUserRecvKey VARCHAR(128) DEFAULT NULL,
24 RegionUserURI NVARCHAR(255) null, 24 RegionUserSendKey VARCHAR(128) DEFAULT NULL,
25 RegionUserRecvKey NVARCHAR(128) null, 25 regionMapTexture VARCHAR(36) DEFAULT NULL,
26 RegionUserSendKey NVARCHAR(128) null, 26 ServerHttpPort INT DEFAULT NULL,
27 ServerHttpPort INT null, 27 ServerRemotingPort INT DEFAULT NULL,
28 ServerRemotingPort INT null, 28 OwnerID VARCHAR(36) DEFAULT NULL,
29 RegionMapTextureID NVARCHAR(255) null, 29 OriginID VARCHAR(36) DEFAULT NULL,
30 Owner_uuid NVARCHAR(255) null, 30 PRIMARY KEY (uuid),
31 OriginUUID NVARCHAR(255) null,
32 primary key (Uuid)
33); 31);
34 32
35create index region_handle on Regions (RegionHandle); 33CREATE INDEX RegionNameIndex ON Regions (RegionName);
36create index region_name on Regions (RegionName); 34CREATE INDEX RegionHandleIndex ON Regions (RegionHandle);
37 35CREATE INDEX RegionHandlesIndex ON Regions (EastOverrideHandle,WestOverrideHandle,SouthOverrideHandle,NorthOverrideHandle);
38COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_InventoryStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_InventoryStore.sql
index 89892df..5f4dcaa 100644
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_InventoryStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_InventoryStore.sql
@@ -1,40 +1,39 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE InventoryFolders ( 1CREATE TABLE InventoryFolders (
4 ID varchar(36) not null primary key, 2 ID VARCHAR(36) NOT NULL,
5 Type int, 3 Type SMALLINT DEFAULT NULL,
6 Version int, 4 Version SMALLINT DEFAULT NULL,
7 ParentID varchar(36), 5 ParentID VARCHAR(36) DEFAULT NULL,
8 Owner varchar(36), 6 Owner VARCHAR(36) DEFAULT NULL,
9 Name varchar(64) 7 Name VARCHAR(64) DEFAULT NULL,
8 PRIMARY KEY (ID)
10); 9);
11 10
12create table InventoryItems ( 11CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner);
13 ID varchar(36) not null primary key, 12CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID);
14 InvType int,
15 AssetType int,
16 AssetID varchar(36),
17 Folder varchar(36),
18 Owner varchar(36),
19 Creator varchar(36),
20 Name varchar(64),
21 Description varchar(64),
22 NextPermissions int,
23 CurrentPermissions int,
24 BasePermissions int,
25 EveryOnePermissions int,
26 GroupID varchar(36),
27 GroupOwned int,
28 SalePrice int,
29 SaleType int,
30 Flags int,
31 CreationDate int
32);
33 13
34CREATE INDEX folder_owner_id on InventoryFolders (Owner); 14CREATE TABLE InventoryItems (
35CREATE INDEX folder_parent_id on InventoryFolders (ParentID); 15 ID VARCHAR(36) NOT NULL,
36CREATE INDEX item_group_id on InventoryItems (GroupID); 16 InvType SMALLINT DEFAULT NULL,
37CREATE INDEX item_owner_id on InventoryItems (Owner); 17 AssetType SMALLINT DEFAULT NULL,
38CREATE INDEX item_folder_id on InventoryItems (Folder); 18 AssetID VARCHAR(36) DEFAULT NULL,
19 Folder VARCHAR(36) DEFAULT NULL,
20 Owner VARCHAR(36) DEFAULT NULL,
21 Creator VARCHAR(36) DEFAULT NULL,
22 Name VARCHAR(64) DEFAULT NULL,
23 Description VARCHAR(64) DEFAULT NULL,
24 NextPermissions INT DEFAULT NULL,
25 CurrentPermissions INT DEFAULT NULL,
26 BasePermissions INT DEFAULT NULL,
27 EveryOnePermissions INT DEFAULT NULL,
28 GroupID VARCHAR(36) DEFAULT NULL,
29 GroupOwned BIT DEFAULT NULL,
30 SalePrice INT DEFAULT NULL,
31 SaleType TINYINT DEFAULT NULL,
32 Flags INT DEFAULT NULL,
33 CreationDate INT DEFAULT NULL,
34 PRIMARY KEY (ID)
35);
39 36
40COMMIT; 37CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID);
38CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner);
39CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder);
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql
index eaa0964..7b591be 100644
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_RegionStore.sql
@@ -1,150 +1,168 @@
1BEGIN TRANSACTION; 1CREATE TABLE Prims (
2 2 UUID VARCHAR(36) NOT NULL,
3create table Prims ( 3 RegionID VARCHAR(36) DEFAULT NULL,
4 UUID TEXT not null, 4 GroupID VARCHAR(36) DEFAULT NULL,
5 RegionID TEXT, 5 ParentID INT DEFAULT NULL,
6 GroupID TEXT, 6 ParentUUID VARCHAR(36) DEFAULT NULL,
7 ParentID INTEGER, 7 OwnerID VARCHAR(36) DEFAULT NULL,
8 ParentUUID TEXT, 8 LastOwnerID VARCHAR(36) DEFAULT NULL,
9 OwnerID TEXT, 9 CreatorID VARCHAR(36) DEFAULT NULL,
10 LastOwnerID TEXT, 10 CreationDate INT DEFAULT NULL,
11 CreatorID TEXT, 11 LinkNum INT DEFAULT NULL,
12 CreationDate INTEGER, 12 Name VARCHAR(255) DEFAULT NULL,
13 LinkNum INTEGER, 13 Text VARCHAR(255) DEFAULT NULL,
14 Name TEXT, 14 Description VARCHAR(255) DEFAULT NULL,
15 Text TEXT, 15 SitName VARCHAR(255) DEFAULT NULL,
16 Description TEXT, 16 TouchName VARCHAR(255) DEFAULT NULL,
17 SitName TEXT, 17 ObjectFlags INT DEFAULT NULL,
18 TouchName TEXT, 18 OwnerMask INT DEFAULT NULL,
19 ObjectFlags INTEGER, 19 NextOwnerMask INT DEFAULT NULL,
20 OwnerMask INTEGER, 20 GroupMask INT DEFAULT NULL,
21 NextOwnerMask INTEGER, 21 EveryoneMask INT DEFAULT NULL,
22 GroupMask INTEGER, 22 BaseMask INT DEFAULT NULL,
23 EveryoneMask INTEGER, 23 Material TINYINT DEFAULT NULL,
24 BaseMask INTEGER, 24 ScriptAccessPin INT DEFAULT NULL,
25 Material INTEGER, 25 TextureAnimation BLOB,
26 ScriptAccessPin INTEGER, 26 ParticleSystem BLOB,
27 TextureAnimation BLOB, 27 ClickAction TINYINT DEFAULT NULL,
28 ParticleSystem BLOB, 28 Color INT DEFAULT NULL,
29 ClickAction INTEGER, 29 PositionX DOUBLE DEFAULT NULL,
30 Color INTEGER, 30 PositionY DOUBLE DEFAULT NULL,
31 PositionX NUMERIC, 31 PositionZ DOUBLE DEFAULT NULL,
32 PositionY NUMERIC, 32 GroupPositionX DOUBLE DEFAULT NULL,
33 PositionZ NUMERIC, 33 GroupPositionY DOUBLE DEFAULT NULL,
34 GroupPositionX NUMERIC, 34 GroupPositionZ DOUBLE DEFAULT NULL,
35 GroupPositionY NUMERIC, 35 VelocityX DOUBLE DEFAULT NULL,
36 GroupPositionZ NUMERIC, 36 VelocityY DOUBLE DEFAULT NULL,
37 VelocityX NUMERIC, 37 VelocityZ DOUBLE DEFAULT NULL,
38 VelocityY NUMERIC, 38 AngularVelocityX DOUBLE DEFAULT NULL,
39 VelocityZ NUMERIC, 39 AngularVelocityY DOUBLE DEFAULT NULL,
40 AngularVelocityX NUMERIC, 40 AngularVelocityZ DOUBLE DEFAULT NULL,
41 AngularVelocityY NUMERIC, 41 AccelerationX DOUBLE DEFAULT NULL,
42 AngularVelocityZ NUMERIC, 42 AccelerationY DOUBLE DEFAULT NULL,
43 AccelerationX NUMERIC, 43 AccelerationZ DOUBLE DEFAULT NULL,
44 AccelerationY NUMERIC, 44 RotationX DOUBLE DEFAULT NULL,
45 AccelerationZ NUMERIC, 45 RotationY DOUBLE DEFAULT NULL,
46 SitTargetOffsetX NUMERIC, 46 RotationZ DOUBLE DEFAULT NULL,
47 SitTargetOffsetY NUMERIC, 47 RotationW DOUBLE DEFAULT NULL,
48 SitTargetOffsetZ NUMERIC, 48 SitTargetOffsetX DOUBLE DEFAULT NULL,
49 RotationX NUMERIC, 49 SitTargetOffsetY DOUBLE DEFAULT NULL,
50 RotationY NUMERIC, 50 SitTargetOffsetZ DOUBLE DEFAULT NULL,
51 RotationZ NUMERIC, 51 SitTargetOrientW DOUBLE DEFAULT NULL,
52 RotationW NUMERIC, 52 SitTargetOrientX DOUBLE DEFAULT NULL,
53 SitTargetOrientX NUMERIC, 53 SitTargetOrientY DOUBLE DEFAULT NULL,
54 SitTargetOrientY NUMERIC, 54 SitTargetOrientZ DOUBLE DEFAULT NULL,
55 SitTargetOrientZ NUMERIC, 55 -- this is the shape
56 SitTargetOrientW NUMERIC, 56 Shape INT DEFAULT NULL,
57 ScaleX NUMERIC, 57 ScaleX DOUBLE DEFAULT NULL,
58 ScaleY NUMERIC, 58 ScaleY DOUBLE DEFAULT NULL,
59 ScaleZ NUMERIC, 59 ScaleZ DOUBLE DEFAULT NULL,
60 PCode INTEGER, 60 PCode INT DEFAULT NULL,
61 PathBegin INTEGER, 61 PathBegin INT DEFAULT NULL,
62 PathEnd INTEGER, 62 PathEnd INT DEFAULT NULL,
63 PathScaleX INTEGER, 63 PathScaleX INT DEFAULT NULL,
64 PathScaleY INTEGER, 64 PathScaleY INT DEFAULT NULL,
65 PathShearX INTEGER, 65 PathShearX INT DEFAULT NULL,
66 PathShearY INTEGER, 66 PathShearY INT DEFAULT NULL,
67 PathSkew INTEGER, 67 PathSkew INT DEFAULT NULL,
68 PathCurve INTEGER, 68 PathCurve INT DEFAULT NULL,
69 PathRadiusOffset INTEGER, 69 PathRadiusOffset INT DEFAULT NULL,
70 PathRevolutions INTEGER, 70 PathRevolutions INT DEFAULT NULL,
71 PathTaperX INTEGER, 71 PathTaperX INT DEFAULT NULL,
72 PathTwist INTEGER, 72 PathTaperY INT DEFAULT NULL,
73 ProfileBegin INTEGER, 73 PathTwist INT DEFAULT NULL,
74 ProfileEnd INTEGER, 74 PathTwistBegin INT DEFAULT NULL,
75 ProfileCurve INTEGER, 75 ProfileBegin INT DEFAULT NULL,
76 ProfileHollow INTEGER, 76 ProfileEnd INT DEFAULT NULL,
77 Texture BLOB, 77 ProfileCurve INT DEFAULT NULL,
78 ExtraParams BLOB, 78 ProfileHollow INT DEFAULT NULL,
79 State INTEGER, 79 State INT DEFAULT NULL,
80 primary key (UUID) 80 Texture BLOB,
81 ExtraParams BLOB,
82 PRIMARY KEY (UUID)
81); 83);
82create table Terrain ( 84
83 RegionID TEXT not null, 85CREATE INDEX PrimsRegionIdIndex ON Prims (RegionID);
84 MapData BLOB, 86CREATE INDEX PrimsRegionParentUuidIndex ON Prims (ParentUUID);
85 primary key (RegionID) 87
88CREATE TABLE Terrain (
89 RegionID VARCHAR(36) NOT NULL,
90 MapData BLOB,
91 PRIMARY KEY (RegionID)
86); 92);
87create table PrimItems ( 93
88 ItemID TEXT not null, 94CREATE TABLE PrimItems (
89 PrimID TEXT, 95 ItemID VARCHAR(36) NOT NULL,
90 AssetID TEXT, 96 GroupID VARCHAR(36) DEFAULT NULL,
91 ParentFolderID TEXT, 97 PrimID VARCHAR(36) DEFAULT NULL,
92 CreatorID TEXT, 98 ParentFolderID VARCHAR(36) DEFAULT NULL,
93 OwnerID TEXT, 99 AssetID VARCHAR(36) DEFAULT NULL,
94 GroupID TEXT, 100 OwnerID VARCHAR(36) DEFAULT NULL,
95 LastOwnerID TEXT, 101 LastOwnerID VARCHAR(36) DEFAULT NULL,
96 CurrentPermissions INTEGER, 102 CreatorID VARCHAR(36) DEFAULT NULL,
97 BasePermissions INTEGER, 103 CreationDate BIGINT DEFAULT NULL,
98 EveryonePermissions INTEGER, 104 InvType INT DEFAULT NULL,
99 GroupPermissions INTEGER, 105 Name VARCHAR(255) DEFAULT NULL,
100 NextPermissions INTEGER, 106 Description VARCHAR(255) DEFAULT NULL,
101 Name TEXT, 107 NextPermissions INT DEFAULT NULL,
102 Description TEXT, 108 CurrentPermissions INT DEFAULT NULL,
103 CreationDate INTEGER, 109 BasePermissions INT DEFAULT NULL,
104 Flags INTEGER, 110 EveryonePermissions INT DEFAULT NULL,
105 InvType INTEGER, 111 GroupPermissions INT DEFAULT NULL,
106 primary key (ItemID) 112 Flags INT DEFAULT NULL,
113 PRIMARY KEY (ItemID)
107); 114);
108 115
116CREATE INDEX PrimItemsPrimIdIndex ON PrimItems (PrimID);
117
109CREATE TABLE RegionSettings ( 118CREATE TABLE RegionSettings (
110 RegionID TEXT not null, 119 RegionID VARCHAR(36) NOT NULL,
111 BlockTerraform BIT, 120
112 BlockFly BIT, 121 BlockTerraform BIT DEFAULT NULL,
113 AllowDamage BIT, 122 BlockFly BIT DEFAULT NULL,
114 RestrictPushing BIT, 123 AllowDamage BIT DEFAULT NULL,
115 AllowLandResell BIT, 124 RestrictPushing BIT DEFAULT NULL,
116 AllowLandJoinDivide BIT, 125 AllowLandResell BIT DEFAULT NULL,
117 BlockShowInSearch BIT, 126 AllowLandJoinDivide BIT DEFAULT NULL,
118 AgentLimit INTEGER, 127 BlockShowInSearch BIT DEFAULT NULL,
119 ObjectBonus NUMERIC, 128
120 Maturity INTEGER, 129 AgentLimit INT DEFAULT NULL,
121 DisableScripts BIT, 130 ObjectBonus DOUBLE DEFAULT NULL,
122 DisableCollisions BIT, 131 Maturity INT DEFAULT NULL,
123 DisablePhysics BIT, 132
124 TerrainTexture1 TEXT, 133 DisableScripts BIT DEFAULT NULL,
125 TerrainTexture2 TEXT, 134 DisableCollisions BIT DEFAULT NULL,
126 TerrainTexture3 TEXT, 135 DisablePhysics BIT DEFAULT NULL,
127 TerrainTexture4 TEXT, 136
128 Elevation1NW NUMERIC, 137 TerrainTexture1 VARCHAR(36) DEFAULT NULL,
129 Elevation2NW NUMERIC, 138 TerrainTexture2 VARCHAR(36) DEFAULT NULL,
130 Elevation1NE NUMERIC, 139 TerrainTexture3 VARCHAR(36) DEFAULT NULL,
131 Elevation2NE NUMERIC, 140 TerrainTexture4 VARCHAR(36) DEFAULT NULL,
132 Elevation1SE NUMERIC, 141
133 Elevation2SE NUMERIC, 142 Elevation1NW DOUBLE DEFAULT NULL,
134 Elevation1SW NUMERIC, 143 Elevation2NW DOUBLE DEFAULT NULL,
135 Elevation2SW NUMERIC, 144 Elevation1NE DOUBLE DEFAULT NULL,
136 WaterHeight NUMERIC, 145 Elevation2NE DOUBLE DEFAULT NULL,
137 TerrainRaiseLimit NUMERIC, 146 Elevation1SE DOUBLE DEFAULT NULL,
138 TerrainLowerLimit NUMERIC, 147 Elevation2SE DOUBLE DEFAULT NULL,
139 UseEstateSun BIT, 148 Elevation1SW DOUBLE DEFAULT NULL,
140 Sandbox BIT, 149 Elevation2SW DOUBLE DEFAULT NULL,
141 SunVectorX NUMERIC, 150
142 SunVectorY NUMERIC, 151 WaterHeight DOUBLE DEFAULT NULL,
143 SunVectorZ NUMERIC, 152 TerrainRaiseLimit DOUBLE DEFAULT NULL,
144 FixedSun BIT, 153 TerrainLowerLimit DOUBLE DEFAULT NULL,
145 SunPosition NUMERIC,
146 Covenant TEXT,
147 primary key (RegionID)
148);
149 154
150COMMIT; 155 UseEstateSun BIT DEFAULT NULL,
156 Sandbox BIT DEFAULT NULL,
157
158 SunVectorX DOUBLE DEFAULT NULL,
159 SunVectorY DOUBLE DEFAULT NULL,
160 SunVectorZ DOUBLE DEFAULT NULL,
161
162 FixedSun BIT DEFAULT NULL,
163 SunPosition DOUBLE DEFAULT NULL,
164
165 Covenant VARCHAR(36) DEFAULT NULL,
166
167 PRIMARY KEY (RegionID)
168);
diff --git a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql
index c5e42d5..6084886 100644
--- a/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql
+++ b/OpenSim/Data/NHibernate/Resources/SQLiteDialect/001_UserStore.sql
@@ -1,108 +1,104 @@
1BEGIN TRANSACTION; 1CREATE TABLE UserAgents (
2 2 ProfileID VARCHAR(36) NOT NULL,
3create table UserAgents ( 3 AgentIP VARCHAR(24) DEFAULT NULL,
4 ProfileID TEXT not null, 4 AgentPort INT DEFAULT NULL,
5 AgentIP TEXT, 5 AgentOnline BIT DEFAULT NULL,
6 AgentPort INTEGER, 6 SessionID VARCHAR(36) DEFAULT NULL,
7 AgentOnline INTEGER, 7 SecureSessionID VARCHAR(36) DEFAULT NULL,
8 SessionID TEXT, 8 InitialRegion VARCHAR(255) DEFAULT NULL,
9 SecureSessionID TEXT, 9 Region VARCHAR(255) DEFAULT NULL,
10 InitialRegion TEXT, 10 LoginTime INT DEFAULT NULL,
11 Region TEXT, 11 LogoutTime INT DEFAULT NULL,
12 LoginTime INTEGER, 12 Handle BIGINT DEFAULT NULL,
13 LogoutTime INTEGER, 13 PositionX DOUBLE DEFAULT NULL,
14 Handle INTEGER, 14 PositionY DOUBLE DEFAULT NULL,
15 PositionX NUMERIC, 15 PositionZ DOUBLE DEFAULT NULL,
16 PositionY NUMERIC, 16 LookAtX DOUBLE DEFAULT NULL,
17 PositionZ NUMERIC, 17 LookAtY DOUBLE DEFAULT NULL,
18 LookAtX NUMERIC, 18 LookAtZ DOUBLE DEFAULT NULL,
19 LookAtY NUMERIC, 19 PRIMARY KEY (ProfileID)
20 LookAtZ NUMERIC,
21 primary key (ProfileID)
22); 20);
23 21
24create table UserProfiles ( 22CREATE TABLE UserProfiles (
25 ID TEXT not null, 23 ID VARCHAR(36) NOT NULL,
26 WebLoginKey TEXT, 24 WebLoginKey VARCHAR(36) DEFAULT NULL,
27 FirstName TEXT, 25 FirstName VARCHAR(32) DEFAULT NULL,
28 SurName TEXT, 26 SurName VARCHAR(32) DEFAULT NULL,
29 Email TEXT, 27 Email VARCHAR(250) DEFAULT NULL,
30 PasswordHash TEXT, 28 PasswordHash VARCHAR(32) DEFAULT NULL,
31 PasswordSalt TEXT, 29 PasswordSalt VARCHAR(32) DEFAULT NULL,
32 HomeRegionID TEXT, 30 HomeRegionID VARCHAR(36) DEFAULT NULL,
33 HomeRegionX INTEGER, 31 HomeRegionX INT DEFAULT NULL,
34 HomeRegionY INTEGER, 32 HomeRegionY INT DEFAULT NULL,
35 HomeLocationX NUMERIC, 33 HomeLocationX DOUBLE DEFAULT NULL,
36 HomeLocationY NUMERIC, 34 HomeLocationY DOUBLE DEFAULT NULL,
37 HomeLocationZ NUMERIC, 35 HomeLocationZ DOUBLE DEFAULT NULL,
38 HomeLookAtX NUMERIC, 36 HomeLookAtX DOUBLE DEFAULT NULL,
39 HomeLookAtY NUMERIC, 37 HomeLookAtY DOUBLE DEFAULT NULL,
40 HomeLookAtZ NUMERIC, 38 HomeLookAtZ DOUBLE DEFAULT NULL,
41 Created INTEGER, 39 Created INT DEFAULT NULL,
42 LastLogin INTEGER, 40 LastLogin INT DEFAULT NULL,
43 UserInventoryURI TEXT, 41 UserInventoryURI VARCHAR(255) DEFAULT NULL,
44 UserAssetURI TEXT, 42 UserAssetURI VARCHAR(255) DEFAULT NULL,
45 Image TEXT, 43 Image VARCHAR(36) DEFAULT NULL,
46 FirstLifeImage TEXT, 44 FirstLifeImage VARCHAR(36) DEFAULT NULL,
47 AboutText TEXT, 45 AboutText TEXT DEFAULT NULL,
48 FirstLifeAboutText TEXT, 46 FirstLifeAboutText TEXT DEFAULT NULL,
49 RootInventoryFolderID TEXT, 47 CanDoMask INT DEFAULT NULL,
50 `CanDoMask` INTEGER, 48 WantDoMask INT DEFAULT NULL,
51 `WantDoMask` INTEGER, 49 UserFlags INT DEFAULT NULL,
52 `UserFlags` INTEGER, 50 GodLevel INT DEFAULT NULL,
53 `GodLevel` INTEGER, 51 CustomType VARCHAR(32) DEFAULT NULL,
54 `CustomType` TEXT, 52 Partner VARCHAR(36) DEFAULT NULL,
55 `Partner` TEXT, 53 RootInventoryFolderID VARCHAR(36) DEFAULT NULL,
56 primary key (ID) 54 PRIMARY KEY (ID)
57); 55);
58 56
59create table UserAppearances ( 57CREATE INDEX UserSurnameIndex ON UserProfiles (SurName);
60 Owner TEXT not null, 58CREATE INDEX UserFirstNameIndex ON UserProfiles (FirstName);
61 BodyItem TEXT, 59CREATE UNIQUE INDEX UserFullNameIndex ON UserProfiles (SurName,FirstName);
62 BodyAsset TEXT,
63 SkinItem TEXT,
64 SkinAsset TEXT,
65 HairItem TEXT,
66 HairAsset TEXT,
67 EyesItem TEXT,
68 EyesAsset TEXT,
69 ShirtItem TEXT,
70 ShirtAsset TEXT,
71 PantsItem TEXT,
72 PantsAsset TEXT,
73 ShoesItem TEXT,
74 ShoesAsset TEXT,
75 SocksItem TEXT,
76 SocksAsset TEXT,
77 JacketItem TEXT,
78 JacketAsset TEXT,
79 GlovesItem TEXT,
80 GlovesAsset TEXT,
81 UnderShirtItem TEXT,
82 UnderShirtAsset TEXT,
83 UnderPantsItem TEXT,
84 UnderPantsAsset TEXT,
85 SkirtItem TEXT,
86 SkirtAsset TEXT,
87 Texture BLOB,
88 VisualParams BLOB,
89 Serial INTEGER,
90 AvatarHeight NUMERIC,
91 primary key (Owner)
92);
93 60
61CREATE TABLE UserAppearances (
62 Owner VARCHAR(36) NOT NULL,
63 BodyItem VARCHAR(36) DEFAULT NULL,
64 BodyAsset VARCHAR(36) DEFAULT NULL,
65 SkinItem VARCHAR(36) DEFAULT NULL,
66 SkinAsset VARCHAR(36) DEFAULT NULL,
67 HairItem VARCHAR(36) DEFAULT NULL,
68 HairAsset VARCHAR(36) DEFAULT NULL,
69 EyesItem VARCHAR(36) DEFAULT NULL,
70 EyesAsset VARCHAR(36) DEFAULT NULL,
71 ShirtItem VARCHAR(36) DEFAULT NULL,
72 ShirtAsset VARCHAR(36) DEFAULT NULL,
73 PantsItem VARCHAR(36) DEFAULT NULL,
74 PantsAsset VARCHAR(36) DEFAULT NULL,
75 ShoesItem VARCHAR(36) DEFAULT NULL,
76 ShoesAsset VARCHAR(36) DEFAULT NULL,
77 SocksItem VARCHAR(36) DEFAULT NULL,
78 SocksAsset VARCHAR(36) DEFAULT NULL,
79 JacketItem VARCHAR(36) DEFAULT NULL,
80 JacketAsset VARCHAR(36) DEFAULT NULL,
81 GlovesItem VARCHAR(36) DEFAULT NULL,
82 GlovesAsset VARCHAR(36) DEFAULT NULL,
83 UnderShirtItem VARCHAR(36) DEFAULT NULL,
84 UnderShirtAsset VARCHAR(36) DEFAULT NULL,
85 UnderPantsItem VARCHAR(36) DEFAULT NULL,
86 UnderPantsAsset VARCHAR(36) DEFAULT NULL,
87 SkirtItem VARCHAR(36) DEFAULT NULL,
88 SkirtAsset VARCHAR(36) DEFAULT NULL,
89 Texture BLOB,
90 VisualParams BLOB,
91 Serial INT DEFAULT NULL,
92 AvatarHeight FLOAT DEFAULT NULL,
93 PRIMARY KEY (Owner)
94);
94 95
95CREATE TABLE UserFriends ( 96CREATE TABLE UserFriends (
96 UserFriendID TEXT, 97 UserFriendID VARCHAR(36) NOT NULL,
97 OwnerID TEXT, 98 OwnerID VARCHAR(36) DEFAULT NULL,
98 FriendID TEXT, 99 FriendID VARCHAR(36) DEFAULT NULL,
99 FriendPermissions INTEGER, 100 FriendPermissions INT DEFAULT NULL,
100 primary key (UserFriendID) 101 PRIMARY KEY (UserFriendID)
101); 102);
102 103
103create index UserFirstNameIndex on UserProfiles (FirstName); 104CREATE UNIQUE INDEX UserFriendsOwnerIdFriendIdIndex ON UserFriends (OwnerID,FriendID);
104create index UserSurnameIndex on UserProfiles (SurName);
105create unique index UserFullNameIndex on UserProfiles (FirstName,SurName);
106create unique index UserFriendsOwnerFriendIndex on UserFriends (OwnerID,FriendID);
107
108COMMIT;