aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
authorMelanie Thielker2008-10-03 12:11:38 +0000
committerMelanie Thielker2008-10-03 12:11:38 +0000
commitec47a1bff2f8bf18be308a059ca8aaa193c9f540 (patch)
tree59342254518d8e1a4ea46c98bba49bc75a58b367 /OpenSim/Data/MySQL
parentMantis #1360 (diff)
downloadopensim-SC_OLD-ec47a1bff2f8bf18be308a059ca8aaa193c9f540.zip
opensim-SC_OLD-ec47a1bff2f8bf18be308a059ca8aaa193c9f540.tar.gz
opensim-SC_OLD-ec47a1bff2f8bf18be308a059ca8aaa193c9f540.tar.bz2
opensim-SC_OLD-ec47a1bff2f8bf18be308a059ca8aaa193c9f540.tar.xz
Add database persistence for material setting
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs5
-rw-r--r--OpenSim/Data/MySQL/Resources/019_RegionStore.sql6
2 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index 0e8ca68..521490c 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -944,6 +944,7 @@ namespace OpenSim.Data.MySQL
944 createCol(prims, "SaleType", typeof (Int16)); 944 createCol(prims, "SaleType", typeof (Int16));
945 945
946 createCol(prims, "ClickAction", typeof (Byte)); 946 createCol(prims, "ClickAction", typeof (Byte));
947 createCol(prims, "Material", typeof (Byte));
947 948
948 // Add in contraints 949 // Add in contraints
949 prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; 950 prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]};
@@ -1228,6 +1229,8 @@ namespace OpenSim.Data.MySQL
1228 prim.SalePrice = Convert.ToInt32(row["SalePrice"]); 1229 prim.SalePrice = Convert.ToInt32(row["SalePrice"]);
1229 prim.ObjectSaleType = Convert.ToByte(row["SaleType"]); 1230 prim.ObjectSaleType = Convert.ToByte(row["SaleType"]);
1230 1231
1232 prim.Material = Convert.ToByte(row["Material"]);
1233
1231 if (!row.IsNull("ClickAction")) 1234 if (!row.IsNull("ClickAction"))
1232 prim.ClickAction = Convert.ToByte(row["ClickAction"]); 1235 prim.ClickAction = Convert.ToByte(row["ClickAction"]);
1233 1236
@@ -1540,6 +1543,8 @@ namespace OpenSim.Data.MySQL
1540 1543
1541 byte clickAction = prim.ClickAction; 1544 byte clickAction = prim.ClickAction;
1542 row["ClickAction"] = clickAction; 1545 row["ClickAction"] = clickAction;
1546
1547 row["Material"] = prim.Material;
1543 } 1548 }
1544 1549
1545 /// <summary> 1550 /// <summary>
diff --git a/OpenSim/Data/MySQL/Resources/019_RegionStore.sql b/OpenSim/Data/MySQL/Resources/019_RegionStore.sql
new file mode 100644
index 0000000..4c14f2a
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/019_RegionStore.sql
@@ -0,0 +1,6 @@
1begin;
2
3ALTER TABLE prims ADD COLUMN Material tinyint NOT NULL default 3;
4
5commit;
6