diff options
Diffstat (limited to 'OpenSim/Framework/Data.SQLite')
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs index d41dd55..b724337 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs | |||
@@ -1171,7 +1171,17 @@ namespace OpenSim.Framework.Data.SQLite | |||
1171 | s.ProfileEnd = Convert.ToUInt16(row["ProfileEnd"]); | 1171 | s.ProfileEnd = Convert.ToUInt16(row["ProfileEnd"]); |
1172 | s.ProfileCurve = Convert.ToByte(row["ProfileCurve"]); | 1172 | s.ProfileCurve = Convert.ToByte(row["ProfileCurve"]); |
1173 | s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); | 1173 | s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); |
1174 | s.State = Convert.ToByte(row["State"]); | 1174 | try |
1175 | { | ||
1176 | s.State = Convert.ToByte(row["State"]); | ||
1177 | } | ||
1178 | catch (InvalidCastException) | ||
1179 | { | ||
1180 | m_conn.Open(); | ||
1181 | SqliteCommand cmd = | ||
1182 | new SqliteCommand("ALTER TABLE primshapes ADD COLUMN State Integer NOT NULL default 0;", m_conn); | ||
1183 | cmd.ExecuteNonQuery(); | ||
1184 | } | ||
1175 | // text TODO: this isn't right] = but I'm not sure the right | 1185 | // text TODO: this isn't right] = but I'm not sure the right |
1176 | // way to specify this as a blob atm | 1186 | // way to specify this as a blob atm |
1177 | 1187 | ||