-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
I tried to use the example in the readme to create a gorm database:
minimal example:
package main
import (
"database/sql"
"log"
_ "github.com/proullon/ramsql/driver"
"gorm.io/driver/postgres"
"gorm.io/gorm"
)
type Product struct {
gorm.Model
}
// From the example in the readme
func main() {
ramdb, err := sql.Open("ramsql", "TestGormQuickStart")
if err != nil {
log.Fatal(err)
}
db, err := gorm.Open(postgres.New(postgres.Config{Conn: ramdb}), &gorm.Config{})
if err != nil {
log.Fatal(err)
}
// Migrate the schema
err = db.AutoMigrate(&Product{})
if err != nil {
log.Fatal(err)
}
}When I try to run this I get the following error:
schema 'information_schema' does not exist
[0.160ms] [rows:-] SELECT count(*) FROM information_schema.tables WHERE table_schema = CURRENT_SCHEMA() AND table_name = 'products' AND table_type = 'BASE TABLE'
avishayt, jesper-nord, daniellanner and Mcklmo
Metadata
Metadata
Assignees
Labels
No labels