diff options
author | Sean Dague | 2008-07-15 18:57:18 +0000 |
---|---|---|
committer | Sean Dague | 2008-07-15 18:57:18 +0000 |
commit | b5efb49d74919b991fe86b53692180cf4829b565 (patch) | |
tree | dced5c727097a1793f8c0ecd26cb614a3e832d51 /OpenSim/Data | |
parent | * Expose client statistics to the console via 'show stats' (diff) | |
download | opensim-SC-b5efb49d74919b991fe86b53692180cf4829b565.zip opensim-SC-b5efb49d74919b991fe86b53692180cf4829b565.tar.gz opensim-SC-b5efb49d74919b991fe86b53692180cf4829b565.tar.bz2 opensim-SC-b5efb49d74919b991fe86b53692180cf4829b565.tar.xz |
added new ParentUUID property to map out from SOP.
Updated some nhibernate parts, started in on migration.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateRegionData.cs | 19 | ||||
-rw-r--r-- | OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql | 51 |
2 files changed, 66 insertions, 4 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateRegionData.cs b/OpenSim/Data/NHibernate/NHibernateRegionData.cs index a2caab1..1c9e363 100644 --- a/OpenSim/Data/NHibernate/NHibernateRegionData.cs +++ b/OpenSim/Data/NHibernate/NHibernateRegionData.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Data.NHibernate | |||
52 | 52 | ||
53 | private Configuration cfg; | 53 | private Configuration cfg; |
54 | private ISessionFactory factory; | 54 | private ISessionFactory factory; |
55 | //private ISession session; | 55 | private ISession session; |
56 | 56 | ||
57 | public void Initialise() | 57 | public void Initialise() |
58 | { | 58 | { |
@@ -89,11 +89,11 @@ namespace OpenSim.Data.NHibernate | |||
89 | cfg.AddInputStream(stream); | 89 | cfg.AddInputStream(stream); |
90 | 90 | ||
91 | factory = cfg.BuildSessionFactory(); | 91 | factory = cfg.BuildSessionFactory(); |
92 | //session = factory.OpenSession(); | 92 | session = factory.OpenSession(); |
93 | 93 | ||
94 | // This actually does the roll forward assembly stuff | 94 | // This actually does the roll forward assembly stuff |
95 | Assembly assem = GetType().Assembly; | 95 | Assembly assem = GetType().Assembly; |
96 | Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "AssetStore"); | 96 | Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "RegionStore"); |
97 | m.Update(); | 97 | m.Update(); |
98 | } | 98 | } |
99 | 99 | ||
@@ -119,7 +119,18 @@ namespace OpenSim.Data.NHibernate | |||
119 | /// <param name="regionUUID">the region UUID</param> | 119 | /// <param name="regionUUID">the region UUID</param> |
120 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) | 120 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) |
121 | { | 121 | { |
122 | //NHPrim[] prims = (NHPrim[]) obj.GetParts(); | 122 | foreach (SceneObjectPart part in obj.Children.Values) |
123 | { | ||
124 | try | ||
125 | { | ||
126 | session.SaveOrUpdate(part); | ||
127 | } | ||
128 | catch (Exception e) | ||
129 | { | ||
130 | m_log.Error("Can't save: ", e); | ||
131 | } | ||
132 | } | ||
133 | |||
123 | } | 134 | } |
124 | 135 | ||
125 | /// <summary> | 136 | /// <summary> |
diff --git a/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql new file mode 100644 index 0000000..f3b7a73 --- /dev/null +++ b/OpenSim/Data/NHibernate/Resources/MySQLDialect/001_RegionStore.sql | |||
@@ -0,0 +1,51 @@ | |||
1 | CREATE TABLE `prims` ( | ||
2 | `ParentID` int(11) default NULL, | ||
3 | `CreationDate` int(11) default NULL, | ||
4 | `Name` varchar(255) default NULL, | ||
5 | `ParentUUID` char(36) default NULL, | ||
6 | `Text` varchar(255) default NULL, | ||
7 | `Description` varchar(255) default NULL, | ||
8 | `SitName` varchar(255) default NULL, | ||
9 | `TouchName` varchar(255) default NULL, | ||
10 | `ObjectFlags` int(11) default NULL, | ||
11 | `OwnerMask` int(11) default NULL, | ||
12 | `NextOwnerMask` int(11) default NULL, | ||
13 | `GroupMask` int(11) default NULL, | ||
14 | `EveryoneMask` int(11) default NULL, | ||
15 | `BaseMask` int(11) default NULL, | ||
16 | `PositionX` float default NULL, | ||
17 | `PositionY` float default NULL, | ||
18 | `PositionZ` float default NULL, | ||
19 | `GroupPositionX` float default NULL, | ||
20 | `GroupPositionY` float default NULL, | ||
21 | `GroupPositionZ` float default NULL, | ||
22 | `VelocityX` float default NULL, | ||
23 | `VelocityY` float default NULL, | ||
24 | `VelocityZ` float default NULL, | ||
25 | `AngularVelocityX` float default NULL, | ||
26 | `AngularVelocityY` float default NULL, | ||
27 | `AngularVelocityZ` float default NULL, | ||
28 | `AccelerationX` float default NULL, | ||
29 | `AccelerationY` float default NULL, | ||
30 | `AccelerationZ` float default NULL, | ||
31 | `RotationX` float default NULL, | ||
32 | `RotationY` float default NULL, | ||
33 | `RotationZ` float default NULL, | ||
34 | `RotationW` float default NULL, | ||
35 | `SitTargetOffsetX` float default NULL, | ||
36 | `SitTargetOffsetY` float default NULL, | ||
37 | `SitTargetOffsetZ` float default NULL, | ||
38 | `SitTargetOrientW` float default NULL, | ||
39 | `SitTargetOrientX` float default NULL, | ||
40 | `SitTargetOrientY` float default NULL, | ||
41 | `SitTargetOrientZ` float default NULL, | ||
42 | `UUID` char(36) NOT NULL default '', | ||
43 | `RegionID` char(36) default NULL, | ||
44 | `CreatorID` char(36) default NULL, | ||
45 | `OwnerID` char(36) default NULL, | ||
46 | `GroupID` char(36) default NULL, | ||
47 | `LastOwnerID` char(36) default NULL, | ||
48 | PRIMARY KEY (`UUID`), | ||
49 | KEY `prims_regionuuid` (`RegionID`), | ||
50 | KEY 'prims_parentuuid' ('ParentUUID') | ||
51 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 \ No newline at end of file | ||