Insert a ROLLBACK command on migration step failure. This ensures that

updating the Migrations table will not occur in a partial transaction, which
would be auto-rolled-back later.
slimupdates
Melanie 2010-04-22 17:45:03 +01:00
parent e33209fe5b
commit ebcc9874d4
1 changed files with 2 additions and 0 deletions

View File

@ -146,6 +146,8 @@ namespace OpenSim.Data
{ {
m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", cmd.CommandText); m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", cmd.CommandText);
m_log.DebugFormat("[MIGRATIONS]: An error has occurred in the migration {0}.\n This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing.", e.Message); m_log.DebugFormat("[MIGRATIONS]: An error has occurred in the migration {0}.\n This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing.", e.Message);
cmd.CommandText = "ROLLBACK;";
cmd.ExecuteNonQuery();
} }
if (version == 0) if (version == 0)