* Added a hack-ish routine to add the State column to the primshapes table if it wasn't already there.

* Started OpenSim on SQLite to a mass of red 'unable to load prim' messages.
* If you are getting this message, after this update, when you start OpenSimulator, you'll get it one more time and then it'll work again.
0.6.0-stable
Teravus Ovares 2008-03-09 14:27:44 +00:00
parent 7a9e572e8a
commit 13a4d13d67
1 changed files with 11 additions and 1 deletions

View File

@ -1171,7 +1171,17 @@ namespace OpenSim.Framework.Data.SQLite
s.ProfileEnd = Convert.ToUInt16(row["ProfileEnd"]); s.ProfileEnd = Convert.ToUInt16(row["ProfileEnd"]);
s.ProfileCurve = Convert.ToByte(row["ProfileCurve"]); s.ProfileCurve = Convert.ToByte(row["ProfileCurve"]);
s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]);
try
{
s.State = Convert.ToByte(row["State"]); s.State = Convert.ToByte(row["State"]);
}
catch (InvalidCastException)
{
m_conn.Open();
SqliteCommand cmd =
new SqliteCommand("ALTER TABLE primshapes ADD COLUMN State Integer NOT NULL default 0;", m_conn);
cmd.ExecuteNonQuery();
}
// text TODO: this isn't right] = but I'm not sure the right // text TODO: this isn't right] = but I'm not sure the right
// way to specify this as a blob atm // way to specify this as a blob atm