Skip to content
Snippets Groups Projects
Commit 7f486bd6 authored by brinn's avatar brinn
Browse files

Add simple error handling for the case where the db user already exists.

SVN: 168
parent 0b029176
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,13 @@ public class DBMigrationEngine
String createUserSQL = createScript("createUser.sql", owner, databaseName);
String createDatabaseSQL = createScript("createDatabase.sql", owner, databaseName);
template.execute(createUserSQL);
try
{
template.execute(createUserSQL);
} catch (BadSqlGrammarException ex)
{
// TODO: have better error checking here.
}
template.execute(createDatabaseSQL);
migrateOrCreate(version);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment