fix create schema on tests

This commit is contained in:
Lunny Xiao 2019-01-21 22:48:08 +08:00
parent 27f1ad8db5
commit 1ad7283e69
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ func createEngine(dbType, connStr string) error {
}
}
if *schema != "" {
if _, err = db.Exec("CREATE SCHEMA " + *schema); err != nil {
if _, err = db.Exec("CREATE SCHEMA IF NOT EXISTS " + *schema); err != nil {
return fmt.Errorf("CREATE SCHEMA: %v", err)
}
}