mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
* Table creation now checks if the table already exists before building it.
This commit is contained in:
@@ -860,9 +860,33 @@ namespace OpenSim.DataStore.MonoSqlite
|
||||
SqliteCommand scmd = new SqliteCommand(createShapes, conn);
|
||||
SqliteCommand tcmd = new SqliteCommand(createTerrain, conn);
|
||||
conn.Open();
|
||||
pcmd.ExecuteNonQuery();
|
||||
scmd.ExecuteNonQuery();
|
||||
tcmd.ExecuteNonQuery();
|
||||
|
||||
try
|
||||
{
|
||||
pcmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (SqliteSyntaxException) {
|
||||
MainLog.Instance.Warn("SQLITE","Primitives Table Already Exists");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
scmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Warn("SQLITE", "Shapes Table Already Exists");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
tcmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (SqliteSyntaxException)
|
||||
{
|
||||
MainLog.Instance.Warn("SQLITE", "Terrain Table Already Exists");
|
||||
}
|
||||
|
||||
conn.Close();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user