My struct is defined as follows:
type Article struct {
gorm.Model
title string `gorm:"not null; unique"`
url string
raw string `sql:"text"`
relations []string `sql:"type:JSONB NOT NULL DEFAULT '{}'::JSONB"`
filename string
}
when I place the call db.AutoMigrate(&Article{}), it successfully creates all the gorm.Model schema (id, created_at, etc), but does not create additional properties.
I thought it might be an error in my schema definition, but have tried with simpler schemas to no avail.
Can u paste exectutable code..
Sorry trying to goto bug list as a kind ateam member in triage
Here you go.
https://gist.github.com/ianseyer/a6101c7f39d85a478eea0fe684428b10
Watch out - it's experimentally concurrent. Can't get it to work until I can create my Schema (and I don't want to do it manually).
If I remember correctly it creates only names with uppercase first letter so that it gets exported
That appears to be correct. Less-than-silent errors would be greatly appreciated.
However, now it appears that relations and filename are not being created.
Most helpful comment
If I remember correctly it creates only names with uppercase first letter so that it gets exported