From ec47a1bff2f8bf18be308a059ca8aaa193c9f540 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 3 Oct 2008 12:11:38 +0000 Subject: Add database persistence for material setting --- OpenSim/Data/SQLite/Resources/012_RegionStore.sql | 5 +++++ OpenSim/Data/SQLite/SQLiteRegionData.cs | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 OpenSim/Data/SQLite/Resources/012_RegionStore.sql (limited to 'OpenSim/Data/SQLite') diff --git a/OpenSim/Data/SQLite/Resources/012_RegionStore.sql b/OpenSim/Data/SQLite/Resources/012_RegionStore.sql new file mode 100644 index 0000000..d952b78 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/012_RegionStore.sql @@ -0,0 +1,5 @@ +BEGIN; + +ALTER TABLE prims ADD COLUMN Material INTEGER NOT NULL default 3; + +COMMIT; diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index bc64ba0..c6cd08f 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs @@ -859,6 +859,8 @@ namespace OpenSim.Data.SQLite // click action createCol(prims, "ClickAction", typeof (Byte)); + createCol(prims, "Material", typeof(Int32)); + // Add in contraints prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; @@ -1213,6 +1215,8 @@ namespace OpenSim.Data.SQLite prim.SalePrice = Convert.ToInt32(row["SalePrice"]); prim.ObjectSaleType = Convert.ToByte(row["SaleType"]); + + prim.Material = Convert.ToByte(row["Material"]); return prim; } @@ -1529,6 +1533,8 @@ namespace OpenSim.Data.SQLite // click action row["ClickAction"] = prim.ClickAction; + + row["SalePrice"] = prim.SalePrice; } /// -- cgit v1.1