I am trying to add a schema and repo functions to an existing context.
I run mix phx.gen.context ExistingContext NewSchema new_schema …
Phoenix picks up that I’m adding to an existing context and asks if I want to proceed, I say yes, everything seems to have been generated fine, I run the migrations. But when I try to compile I get the following error message:
Project.Context.Project.Context.Schema.struct/1 is undefined, cannot expand struct Project.Context.Project.Context.Schema
For some reason Phoenix seems to have duplicated the project/context path and is looking for the schema in a non-existing place. Anyone have an idea what is happening here?
EDIT: I now tried generating just the schema and add code in the context file manually, the problem is the same.