Open deerbone opened 8 months ago
Um guessing at this point you have found a solution or given up but in case someone else ends up here:
It seems that atlas doesn't support the embedded
struct tag at the moment, you can achieve what you want by embedding the struct itself, not ideal but its a stop gap until the embedded tag gets implemented
type UserWithAddress struct {
User
Address string `gorm:"column:address"`
}
Hey,
If you need something more involved, I suggest using Go Program Mode which give you ultimate control on the models the provider uses as the desired schema.
Hi, is there a way to set-up atlas to specify what models I want to exclude?
In our project we define some helper models that we do not migrate to the DB, we only work with them in the program itself.
Small example that doesn't really make sense:
atlas.hcl
What gets generated with
atlas migrate diff
The schema that GORM creates:
Is there a way for me to achieve this?