Open advdv opened 7 months ago
Thanks for reporting this. We'll give this a look, it might be an issue with the ent/schema loader.
I've solved this for my use case by annotating the User entity with an explicit schema:
func (User) Annotations() []schema.Annotation {
return []schema.Annotation{
entsql.Schema("public"),
}
}
from a usability perspective it would probably still make sense if:
Frustrated by not being able use versioned migrations approach (see #2430 ) I'm trying the declarative approach. I want to take my schema from Ent.
schema/user.go
When I run
atlas schema apply --env=ent --to=ent://schema
it gives me:This is a confusing error, and no way to run it in verbose mode or anything. I'm GUESSING that it has to do with "ent" not providing a postgres schema and somehow "public" is not the default. I've tried adding the "--schema" but that doesn't help.
MAYBE it's about the search_path n the dev-url, but removing that gives me:
Error: missing schema in --dev-url. See: https://atlasgo.io/url