Postgresql – ERROR: insert or update on table "promos" violates foreign key constraint "fk_businesses_promos"
I'm trying to bulid a REST API using go and specifically GORM. My entities look like this: type Business struct { ID string `json:"id" gorm:"primaryKey;not null;type:uuid;default:gen_random_uuid()"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` Email string `json:"email" gorm:"uniqueIndex;not null;"` Password []byte `json:"-"`…