2020-06-07 08:16:09 +03:00
Your issue may already be reported! Please search on the [issue track ](https://github.com/go-gorm/gorm/issues ) before creating one.
2017-04-18 10:50:22 +03:00
2017-04-18 10:40:26 +03:00
### What version of Go are you using (`go version`)?
### Which database and its version are you using?
2018-02-10 08:15:04 +03:00
### Please provide a complete runnable program to reproduce your issue. **IMPORTANT**
2017-04-18 10:40:26 +03:00
2020-06-07 08:16:09 +03:00
Need to runnable with [GORM's docker compose config ](https://github.com/go-gorm/gorm/blob/master/tests/docker-compose.yml ) or please provides your config.
2017-04-18 10:40:26 +03:00
```go
package main
import (
2020-06-07 08:16:09 +03:00
"gorm.io/gorm"
"gorm.io/driver/sqlite"
// "gorm.io/driver/mysql"
// "gorm.io/driver/postgres"
// "gorm.io/driver/sqlserver"
2017-04-18 10:40:26 +03:00
)
2020-06-07 08:16:09 +03:00
func main() {
db, err := gorm.Open(sqlite.Open(filepath.Join(os.TempDir(), "gorm.db")), & gorm.Config{})
// db, err := gorm.Open(postgres.Open("user=gorm password=gorm DB.name=gorm port=9920 sslmode=disable TimeZone=Asia/Shanghai"), & gorm.Config{})
// db, err := gorm.Open(mysql.Open("gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8& parseTime=True& loc=Local"), & gorm.Config{})
// db, err := gorm.Open(sqlserver.Open("sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm"), & gorm.Config{})
2017-04-18 10:40:26 +03:00
2020-06-07 08:16:09 +03:00
/* your code */
2017-04-18 10:40:26 +03:00
if /* failure condition */ {
fmt.Println("failed")
} else {
fmt.Println("success")
}
}
```