From d00466f09af214da8bedac89440ecad1d8c7b00d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 26 Jul 2010 23:19:31 +0100 Subject: add mysql support for media on a prim --- OpenSim/Data/MySQL/MySQLLegacyRegionData.cs | 8 ++++++-- OpenSim/Data/MySQL/Resources/RegionStore.migrations | 9 ++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs index bfeae12..f17e8ae 100644 --- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs @@ -222,7 +222,7 @@ namespace OpenSim.Data.MySQL "PathTaperX, PathTaperY, PathTwist, " + "PathTwistBegin, ProfileBegin, ProfileEnd, " + "ProfileCurve, ProfileHollow, Texture, " + - "ExtraParams, State) values (?UUID, " + + "ExtraParams, State, Media) values (?UUID, " + "?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " + "?PCode, ?PathBegin, ?PathEnd, " + "?PathScaleX, ?PathScaleY, " + @@ -233,7 +233,7 @@ namespace OpenSim.Data.MySQL "?PathTwistBegin, ?ProfileBegin, " + "?ProfileEnd, ?ProfileCurve, " + "?ProfileHollow, ?Texture, ?ExtraParams, " + - "?State)"; + "?State, ?Media)"; FillShapeCommand(cmd, prim); @@ -1700,6 +1700,9 @@ namespace OpenSim.Data.MySQL s.ExtraParams = (byte[])row["ExtraParams"]; s.State = (byte)(int)row["State"]; + + if (!(row["Media"] is System.DBNull)) + s.MediaRaw = (string)row["Media"]; return s; } @@ -1743,6 +1746,7 @@ namespace OpenSim.Data.MySQL cmd.Parameters.AddWithValue("Texture", s.TextureEntry); cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams); cmd.Parameters.AddWithValue("State", s.State); + cmd.Parameters.AddWithValue("Media", s.MediaRaw); } public void StorePrimInventory(UUID primID, ICollection items) diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index 3f644f9..1369704 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations @@ -1,4 +1,4 @@ - + :VERSION 1 #--------------------- BEGIN; @@ -800,3 +800,10 @@ BEGIN; ALTER TABLE `regionwindlight` CHANGE COLUMN `cloud_scroll_x` `cloud_scroll_x` FLOAT(4,2) NOT NULL DEFAULT '0.20' AFTER `cloud_detail_density`, CHANGE COLUMN `cloud_scroll_y` `cloud_scroll_y` FLOAT(4,2) NOT NULL DEFAULT '0.01' AFTER `cloud_scroll_x_lock`; COMMIT; +:VERSION 35 #--------------------- +-- Added post 0.7 + +BEGIN; +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