* Table creation now checks if the table already exists before building it.

afrisby
Adam Frisby 2007-10-22 22:15:38 +00:00
parent b02fa17acc
commit 3e5fcf90aa
1 changed files with 27 additions and 3 deletions

View File

@ -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();
} }