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