fix postgres schema tests
This commit is contained in:
parent
7ecdf5b255
commit
0cd6d581ad
|
@ -54,11 +54,10 @@ func createEngine(dbType, connStr string) error {
|
|||
}
|
||||
defer rows.Close()
|
||||
|
||||
if rows.Next() {
|
||||
break
|
||||
}
|
||||
if _, err = db.Exec("CREATE DATABASE xorm_test"); err != nil {
|
||||
return fmt.Errorf("db.Exec: %v", err)
|
||||
if !rows.Next() {
|
||||
if _, err = db.Exec("CREATE DATABASE xorm_test"); err != nil {
|
||||
return fmt.Errorf("db.Exec: %v", err)
|
||||
}
|
||||
}
|
||||
if schema != nil {
|
||||
if _, err = db.Exec("CREATE SCHEMA " + *schema); err != nil {
|
||||
|
|
Loading…
Reference in New Issue