Add no permission message when fail to create hstore extension

This commit is contained in:
Jinzhu 2014-06-14 10:54:14 +08:00
parent 8be30beee9
commit a89500c855
1 changed files with 1 additions and 0 deletions

View File

@ -2049,6 +2049,7 @@ func TestHstore(t *testing.T) {
} }
if err := db.Exec("CREATE EXTENSION IF NOT EXISTS hstore").Error; err != nil { if err := db.Exec("CREATE EXTENSION IF NOT EXISTS hstore").Error; err != nil {
fmt.Println("\033[31mHINT: Must be superuser to create hstore extension (ALTER USER gorm WITH SUPERUSER;)\033[0m")
panic(fmt.Sprintf("No error should happen when create hstore extension, but got %+v", err)) panic(fmt.Sprintf("No error should happen when create hstore extension, but got %+v", err))
} }