aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-07-26 23:26:22 +0100
committerJustin Clark-Casey (justincc)2010-07-26 23:34:23 +0100
commit109ddd1bd5fcabf3155e579fe6eb15e07869b9b8 (patch)
tree0e0dff6724b3c6d7ae8ac21b9a11dee4bb8ab24e
parentadd mysql support for media on a prim (diff)
downloadopensim-SC_OLD-109ddd1bd5fcabf3155e579fe6eb15e07869b9b8.zip
opensim-SC_OLD-109ddd1bd5fcabf3155e579fe6eb15e07869b9b8.tar.gz
opensim-SC_OLD-109ddd1bd5fcabf3155e579fe6eb15e07869b9b8.tar.bz2
opensim-SC_OLD-109ddd1bd5fcabf3155e579fe6eb15e07869b9b8.tar.xz
add mssql support for media on a prim
compiles but not tested. please test and correct if necessary!
-rw-r--r--OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs10
-rw-r--r--OpenSim/Data/MSSQL/Resources/RegionStore.migrations9
2 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs b/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs
index d6cb91f..e61b4d9 100644
--- a/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs
@@ -385,7 +385,7 @@ IF EXISTS (SELECT UUID FROM primshapes WHERE UUID = @UUID)
385 PathSkew = @PathSkew, PathCurve = @PathCurve, PathRadiusOffset = @PathRadiusOffset, PathRevolutions = @PathRevolutions, 385 PathSkew = @PathSkew, PathCurve = @PathCurve, PathRadiusOffset = @PathRadiusOffset, PathRevolutions = @PathRevolutions,
386 PathTaperX = @PathTaperX, PathTaperY = @PathTaperY, PathTwist = @PathTwist, PathTwistBegin = @PathTwistBegin, 386 PathTaperX = @PathTaperX, PathTaperY = @PathTaperY, PathTwist = @PathTwist, PathTwistBegin = @PathTwistBegin,
387 ProfileBegin = @ProfileBegin, ProfileEnd = @ProfileEnd, ProfileCurve = @ProfileCurve, ProfileHollow = @ProfileHollow, 387 ProfileBegin = @ProfileBegin, ProfileEnd = @ProfileEnd, ProfileCurve = @ProfileCurve, ProfileHollow = @ProfileHollow,
388 Texture = @Texture, ExtraParams = @ExtraParams, State = @State 388 Texture = @Texture, ExtraParams = @ExtraParams, State = @State, Media = @Media
389 WHERE UUID = @UUID 389 WHERE UUID = @UUID
390 END 390 END
391ELSE 391ELSE
@@ -394,11 +394,11 @@ ELSE
394 primshapes ( 394 primshapes (
395 UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, 395 UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY,
396 PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, 396 PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin,
397 ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State 397 ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State, Media
398 ) VALUES ( 398 ) VALUES (
399 @UUID, @Shape, @ScaleX, @ScaleY, @ScaleZ, @PCode, @PathBegin, @PathEnd, @PathScaleX, @PathScaleY, @PathShearX, @PathShearY, 399 @UUID, @Shape, @ScaleX, @ScaleY, @ScaleZ, @PCode, @PathBegin, @PathEnd, @PathScaleX, @PathScaleY, @PathShearX, @PathShearY,
400 @PathSkew, @PathCurve, @PathRadiusOffset, @PathRevolutions, @PathTaperX, @PathTaperY, @PathTwist, @PathTwistBegin, @ProfileBegin, 400 @PathSkew, @PathCurve, @PathRadiusOffset, @PathRevolutions, @PathTaperX, @PathTaperY, @PathTwist, @PathTwistBegin, @ProfileBegin,
401 @ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State 401 @ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State, @Media
402 ) 402 )
403 END"; 403 END";
404 404
@@ -1180,6 +1180,9 @@ VALUES
1180 { 1180 {
1181 } 1181 }
1182 1182
1183 if (!(shapeRow["Media"] is System.DBNull))
1184 baseShape.MediaRaw = (string)shapeRow["Media"];
1185
1183 return baseShape; 1186 return baseShape;
1184 } 1187 }
1185 1188
@@ -1557,6 +1560,7 @@ VALUES
1557 parameters.Add(_Database.CreateParameter("Texture", s.TextureEntry)); 1560 parameters.Add(_Database.CreateParameter("Texture", s.TextureEntry));
1558 parameters.Add(_Database.CreateParameter("ExtraParams", s.ExtraParams)); 1561 parameters.Add(_Database.CreateParameter("ExtraParams", s.ExtraParams));
1559 parameters.Add(_Database.CreateParameter("State", s.State)); 1562 parameters.Add(_Database.CreateParameter("State", s.State));
1563 parameters.Add(_Database.CreateParameter("Media", s.MediaRaw));
1560 1564
1561 return parameters.ToArray(); 1565 return parameters.ToArray();
1562 } 1566 }
diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
index e912d64..e2e8cbb 100644
--- a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
@@ -1,4 +1,4 @@
1 1
2:VERSION 1 2:VERSION 1
3 3
4CREATE TABLE [dbo].[prims]( 4CREATE TABLE [dbo].[prims](
@@ -925,5 +925,12 @@ ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0
925 925
926COMMIT 926COMMIT
927 927
928:VERSION 24
929-- Added post 0.7
930
931BEGIN TRANSACTION
928 932
933ALTER TABLE prims ADD COLUMN MediaURL varchar(255)
934ALTER TABLE primshapes ADD COLUMN Media TEXT
929 935
936COMMIT \ No newline at end of file