From 109ddd1bd5fcabf3155e579fe6eb15e07869b9b8 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 26 Jul 2010 23:26:22 +0100 Subject: add mssql support for media on a prim compiles but not tested. please test and correct if necessary! --- OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs | 10 +++++++--- OpenSim/Data/MSSQL/Resources/RegionStore.migrations | 9 ++++++++- 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) PathSkew = @PathSkew, PathCurve = @PathCurve, PathRadiusOffset = @PathRadiusOffset, PathRevolutions = @PathRevolutions, PathTaperX = @PathTaperX, PathTaperY = @PathTaperY, PathTwist = @PathTwist, PathTwistBegin = @PathTwistBegin, ProfileBegin = @ProfileBegin, ProfileEnd = @ProfileEnd, ProfileCurve = @ProfileCurve, ProfileHollow = @ProfileHollow, - Texture = @Texture, ExtraParams = @ExtraParams, State = @State + Texture = @Texture, ExtraParams = @ExtraParams, State = @State, Media = @Media WHERE UUID = @UUID END ELSE @@ -394,11 +394,11 @@ ELSE primshapes ( UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, - ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State + ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State, Media ) VALUES ( @UUID, @Shape, @ScaleX, @ScaleY, @ScaleZ, @PCode, @PathBegin, @PathEnd, @PathScaleX, @PathScaleY, @PathShearX, @PathShearY, @PathSkew, @PathCurve, @PathRadiusOffset, @PathRevolutions, @PathTaperX, @PathTaperY, @PathTwist, @PathTwistBegin, @ProfileBegin, - @ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State + @ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State, @Media ) END"; @@ -1180,6 +1180,9 @@ VALUES { } + if (!(shapeRow["Media"] is System.DBNull)) + baseShape.MediaRaw = (string)shapeRow["Media"]; + return baseShape; } @@ -1557,6 +1560,7 @@ VALUES parameters.Add(_Database.CreateParameter("Texture", s.TextureEntry)); parameters.Add(_Database.CreateParameter("ExtraParams", s.ExtraParams)); parameters.Add(_Database.CreateParameter("State", s.State)); + parameters.Add(_Database.CreateParameter("Media", s.MediaRaw)); return parameters.ToArray(); } 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 @@ - + :VERSION 1 CREATE TABLE [dbo].[prims]( @@ -925,5 +925,12 @@ ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0 COMMIT +:VERSION 24 +-- Added post 0.7 + +BEGIN TRANSACTION +ALTER TABLE prims ADD COLUMN MediaURL varchar(255) +ALTER TABLE primshapes ADD COLUMN Media TEXT +COMMIT \ No newline at end of file -- cgit v1.1