* Table creation now checks if the table already exists before building it.
parent
b02fa17acc
commit
3e5fcf90aa
|
@ -860,9 +860,33 @@ namespace OpenSim.DataStore.MonoSqlite
|
||||||
SqliteCommand scmd = new SqliteCommand(createShapes, conn);
|
SqliteCommand scmd = new SqliteCommand(createShapes, conn);
|
||||||
SqliteCommand tcmd = new SqliteCommand(createTerrain, conn);
|
SqliteCommand tcmd = new SqliteCommand(createTerrain, conn);
|
||||||
conn.Open();
|
conn.Open();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
pcmd.ExecuteNonQuery();
|
pcmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
catch (SqliteSyntaxException) {
|
||||||
|
MainLog.Instance.Warn("SQLITE","Primitives Table Already Exists");
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
scmd.ExecuteNonQuery();
|
scmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
catch (SqliteSyntaxException)
|
||||||
|
{
|
||||||
|
MainLog.Instance.Warn("SQLITE", "Shapes Table Already Exists");
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
tcmd.ExecuteNonQuery();
|
tcmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
catch (SqliteSyntaxException)
|
||||||
|
{
|
||||||
|
MainLog.Instance.Warn("SQLITE", "Terrain Table Already Exists");
|
||||||
|
}
|
||||||
|
|
||||||
conn.Close();
|
conn.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue