aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLSimulationData.cs18
-rw-r--r--OpenSim/Data/MSSQL/Resources/RegionStore.migrations8
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs19
-rw-r--r--OpenSim/Data/MySQL/Resources/RegionStore.migrations8
-rw-r--r--OpenSim/Data/SQLite/Resources/RegionStore.migrations5
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs19
6 files changed, 68 insertions, 9 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
index 17f42e1..276a190 100644
--- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
@@ -351,7 +351,7 @@ IF EXISTS (SELECT UUID FROM prims WHERE UUID = @UUID)
351 ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice, 351 ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice,
352 SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem, 352 SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem,
353 ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches, 353 ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches,
354 LinkNumber = @LinkNumber, MediaURL = @MediaURL 354 LinkNumber = @LinkNumber, MediaURL = @MediaURL, DynAttrs = @DynAttrs
355 WHERE UUID = @UUID 355 WHERE UUID = @UUID
356 END 356 END
357ELSE 357ELSE
@@ -366,7 +366,7 @@ ELSE
366 PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, 366 PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX,
367 OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, 367 OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ,
368 ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, 368 ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA,
369 ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber, MediaURL 369 ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber, MediaURL, DynAttrs
370 ) VALUES ( 370 ) VALUES (
371 @UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask, 371 @UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask,
372 @EveryoneMask, @BaseMask, @PositionX, @PositionY, @PositionZ, @GroupPositionX, @GroupPositionY, @GroupPositionZ, @VelocityX, 372 @EveryoneMask, @BaseMask, @PositionX, @PositionY, @PositionZ, @GroupPositionX, @GroupPositionY, @GroupPositionZ, @VelocityX,
@@ -376,7 +376,7 @@ ELSE
376 @PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX, 376 @PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX,
377 @OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ, 377 @OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ,
378 @ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA, 378 @ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA,
379 @ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber, @MediaURL 379 @ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber, @MediaURL, @DynAttrs
380 ) 380 )
381 END"; 381 END";
382 382
@@ -1691,6 +1691,11 @@ VALUES
1691 1691
1692 if (!(primRow["MediaURL"] is System.DBNull)) 1692 if (!(primRow["MediaURL"] is System.DBNull))
1693 prim.MediaUrl = (string)primRow["MediaURL"]; 1693 prim.MediaUrl = (string)primRow["MediaURL"];
1694
1695 if (!(primRow["DynAttrs"] is System.DBNull))
1696 prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]);
1697 else
1698 prim.DynAttrs = new DAMap();
1694 1699
1695 return prim; 1700 return prim;
1696 } 1701 }
@@ -1749,7 +1754,6 @@ VALUES
1749 baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]); 1754 baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]);
1750 } 1755 }
1751 1756
1752
1753 return baseShape; 1757 return baseShape;
1754 } 1758 }
1755 1759
@@ -2086,6 +2090,11 @@ VALUES
2086 parameters.Add(_Database.CreateParameter("PassTouches", 0)); 2090 parameters.Add(_Database.CreateParameter("PassTouches", 0));
2087 parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); 2091 parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum));
2088 parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); 2092 parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl));
2093
2094 if (prim.DynAttrs.Count > 0)
2095 parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml()));
2096 else
2097 parameters.Add(_Database.CreateParameter("DynAttrs", null));
2089 2098
2090 return parameters.ToArray(); 2099 return parameters.ToArray();
2091 } 2100 }
@@ -2143,7 +2152,6 @@ VALUES
2143 parameters.Add(_Database.CreateParameter("Media", s.Media.ToXml())); 2152 parameters.Add(_Database.CreateParameter("Media", s.Media.ToXml()));
2144 } 2153 }
2145 2154
2146
2147 return parameters.ToArray(); 2155 return parameters.ToArray();
2148 } 2156 }
2149 2157
diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
index 350e548..92cc38a 100644
--- a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
@@ -1148,3 +1148,11 @@ CREATE TABLE [dbo].[regionenvironment](
1148) ON [PRIMARY] 1148) ON [PRIMARY]
1149 1149
1150COMMIT 1150COMMIT
1151
1152:VERSION 38 #---------------- Dynamic attributes
1153
1154BEGIN TRANSACTION
1155
1156ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
1157
1158COMMIT
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index d562783..c95311e 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -171,7 +171,8 @@ namespace OpenSim.Data.MySQL
171 "ParticleSystem, ClickAction, Material, " + 171 "ParticleSystem, ClickAction, Material, " +
172 "CollisionSound, CollisionSoundVolume, " + 172 "CollisionSound, CollisionSoundVolume, " +
173 "PassTouches, " + 173 "PassTouches, " +
174 "LinkNumber, MediaURL) values (" + "?UUID, " + 174 "LinkNumber, MediaURL, DynAttrs) " +
175 "values (?UUID, " +
175 "?CreationDate, ?Name, ?Text, " + 176 "?CreationDate, ?Name, ?Text, " +
176 "?Description, ?SitName, ?TouchName, " + 177 "?Description, ?SitName, ?TouchName, " +
177 "?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " + 178 "?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " +
@@ -202,7 +203,8 @@ namespace OpenSim.Data.MySQL
202 "?SaleType, ?ColorR, ?ColorG, " + 203 "?SaleType, ?ColorR, ?ColorG, " +
203 "?ColorB, ?ColorA, ?ParticleSystem, " + 204 "?ColorB, ?ColorA, ?ParticleSystem, " +
204 "?ClickAction, ?Material, ?CollisionSound, " + 205 "?ClickAction, ?Material, ?CollisionSound, " +
205 "?CollisionSoundVolume, ?PassTouches, ?LinkNumber, ?MediaURL)"; 206 "?CollisionSoundVolume, ?PassTouches, ?LinkNumber, " +
207 "?MediaURL, ?DynAttrs)";
206 208
207 FillPrimCommand(cmd, prim, obj.UUID, regionUUID); 209 FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
208 210
@@ -219,7 +221,8 @@ namespace OpenSim.Data.MySQL
219 "PathTaperX, PathTaperY, PathTwist, " + 221 "PathTaperX, PathTaperY, PathTwist, " +
220 "PathTwistBegin, ProfileBegin, ProfileEnd, " + 222 "PathTwistBegin, ProfileBegin, ProfileEnd, " +
221 "ProfileCurve, ProfileHollow, Texture, " + 223 "ProfileCurve, ProfileHollow, Texture, " +
222 "ExtraParams, State, Media) values (?UUID, " + 224 "ExtraParams, State, Media) " +
225 "values (?UUID, " +
223 "?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " + 226 "?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " +
224 "?PCode, ?PathBegin, ?PathEnd, " + 227 "?PCode, ?PathBegin, ?PathEnd, " +
225 "?PathScaleX, ?PathScaleY, " + 228 "?PathScaleX, ?PathScaleY, " +
@@ -1291,6 +1294,11 @@ namespace OpenSim.Data.MySQL
1291 1294
1292 if (!(row["MediaURL"] is System.DBNull)) 1295 if (!(row["MediaURL"] is System.DBNull))
1293 prim.MediaUrl = (string)row["MediaURL"]; 1296 prim.MediaUrl = (string)row["MediaURL"];
1297
1298 if (!(row["DynAttrs"] is System.DBNull))
1299 prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]);
1300 else
1301 prim.DynAttrs = new DAMap();
1294 1302
1295 return prim; 1303 return prim;
1296 } 1304 }
@@ -1637,6 +1645,11 @@ namespace OpenSim.Data.MySQL
1637 1645
1638 cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); 1646 cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum);
1639 cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl); 1647 cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl);
1648
1649 if (prim.DynAttrs.Count > 0)
1650 cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml());
1651 else
1652 cmd.Parameters.AddWithValue("DynAttrs", null);
1640 } 1653 }
1641 1654
1642 /// <summary> 1655 /// <summary>
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
index 5b59779..c48aec2 100644
--- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
@@ -902,3 +902,11 @@ BEGIN;
902CREATE TABLE `regionextra` (`RegionID` char(36) not null, `Name` varchar(32) not null, `value` text, primary key(`RegionID`, `Name`)); 902CREATE TABLE `regionextra` (`RegionID` char(36) not null, `Name` varchar(32) not null, `value` text, primary key(`RegionID`, `Name`));
903 903
904COMMIT; 904COMMIT;
905
906:VERSION 46 #---------------- Dynamic attributes
907
908BEGIN;
909
910ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
911
912COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations
index e872977..e583dc2 100644
--- a/OpenSim/Data/SQLite/Resources/RegionStore.migrations
+++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations
@@ -575,3 +575,8 @@ CREATE TABLE `regionenvironment` (
575); 575);
576 576
577COMMIT; 577COMMIT;
578
579:VERSION 27
580BEGIN;
581ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
582COMMIT;
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 29cac3c..91fc704 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -1232,6 +1232,8 @@ namespace OpenSim.Data.SQLite
1232 createCol(prims, "VolumeDetect", typeof(Int16)); 1232 createCol(prims, "VolumeDetect", typeof(Int16));
1233 1233
1234 createCol(prims, "MediaURL", typeof(String)); 1234 createCol(prims, "MediaURL", typeof(String));
1235
1236 createCol(prims, "DynAttrs", typeof(String));
1235 1237
1236 // Add in contraints 1238 // Add in contraints
1237 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; 1239 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] };
@@ -1711,6 +1713,16 @@ namespace OpenSim.Data.SQLite
1711// m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType()); 1713// m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType());
1712 prim.MediaUrl = (string)row["MediaURL"]; 1714 prim.MediaUrl = (string)row["MediaURL"];
1713 } 1715 }
1716
1717 if (!(row["DynAttrs"] is System.DBNull))
1718 {
1719 //m_log.DebugFormat("[SQLITE]: DynAttrs type [{0}]", row["DynAttrs"].GetType());
1720 prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]);
1721 }
1722 else
1723 {
1724 prim.DynAttrs = new DAMap();
1725 }
1714 1726
1715 return prim; 1727 return prim;
1716 } 1728 }
@@ -2133,6 +2145,11 @@ namespace OpenSim.Data.SQLite
2133 row["VolumeDetect"] = 0; 2145 row["VolumeDetect"] = 0;
2134 2146
2135 row["MediaURL"] = prim.MediaUrl; 2147 row["MediaURL"] = prim.MediaUrl;
2148
2149 if (prim.DynAttrs.Count > 0)
2150 row["DynAttrs"] = prim.DynAttrs.ToXml();
2151 else
2152 row["DynAttrs"] = null;
2136 } 2153 }
2137 2154
2138 /// <summary> 2155 /// <summary>
@@ -2392,7 +2409,7 @@ namespace OpenSim.Data.SQLite
2392 2409
2393 if (!(row["Media"] is System.DBNull)) 2410 if (!(row["Media"] is System.DBNull))
2394 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); 2411 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
2395 2412
2396 return s; 2413 return s;
2397 } 2414 }
2398 2415