Add database persistence for material setting
							parent
							
								
									7f007d8ed0
								
							
						
					
					
						commit
						ec47a1bff2
					
				| 
						 | 
				
			
			@ -944,6 +944,7 @@ namespace OpenSim.Data.MySQL
 | 
			
		|||
            createCol(prims, "SaleType", typeof (Int16));
 | 
			
		||||
 | 
			
		||||
            createCol(prims, "ClickAction", typeof (Byte));
 | 
			
		||||
            createCol(prims, "Material", typeof (Byte));
 | 
			
		||||
 | 
			
		||||
            // Add in contraints
 | 
			
		||||
            prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]};
 | 
			
		||||
| 
						 | 
				
			
			@ -1228,6 +1229,8 @@ namespace OpenSim.Data.MySQL
 | 
			
		|||
            prim.SalePrice = Convert.ToInt32(row["SalePrice"]);
 | 
			
		||||
            prim.ObjectSaleType = Convert.ToByte(row["SaleType"]);
 | 
			
		||||
 | 
			
		||||
            prim.Material = Convert.ToByte(row["Material"]);
 | 
			
		||||
 | 
			
		||||
            if (!row.IsNull("ClickAction"))
 | 
			
		||||
                prim.ClickAction = Convert.ToByte(row["ClickAction"]);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1540,6 +1543,8 @@ namespace OpenSim.Data.MySQL
 | 
			
		|||
 | 
			
		||||
            byte clickAction = prim.ClickAction;
 | 
			
		||||
            row["ClickAction"] = clickAction;
 | 
			
		||||
 | 
			
		||||
            row["Material"] = prim.Material;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
begin;
 | 
			
		||||
 | 
			
		||||
ALTER TABLE prims ADD COLUMN Material tinyint NOT NULL default 3;
 | 
			
		||||
 | 
			
		||||
commit;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
BEGIN;
 | 
			
		||||
 | 
			
		||||
ALTER TABLE prims ADD COLUMN Material INTEGER NOT NULL default 3;
 | 
			
		||||
 | 
			
		||||
COMMIT;
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue