Identities split into multiple resources doesn't seem to work
Not sure if I'm doing something wrong, but I have 2 resources that uses the same table,
User and Customer.
In my User resource I have these identities:
And in my Customer resource, I have these identities:
For some reason, Ash just adds the indexes for the User resource in my PostgreSQL table, the one in Customer is simply ignored and doesn't show up in the migrations at all.9 Replies
all the usual stuff i.e: added to the registry? api added to the
ash_apis key in config?Does customer have a
customer_id attribute?
Perhaps you mean :id?Yes, the resource is added to the registry and the api is added to ash_apis, it is not that the resource itself is being ignored, all of its changes (new attributes, etc) are being correctly applied in migrations, just the identities that are not.
Yes, the
Customer has a customer_id attribute, User does not:
Not sure if this helps, but this is the Customer resource code:
Yeah, it’s a bug
GitHub
ash_postgres/lib/migration_generator/migration_generator.ex at main...
A postgresql datalayer for the Ash Framework. Contribute to ash-project/ash_postgres development by creating an account on GitHub.
That needs to add up all of the identities on all snapshots, just like it does for other things.
I’m in the car, but if you want to PR a fix ill merge it
I will take a look
GitHub
fix: Fixes multiple schema identities migrations by sezaru · Pull R...
Contributor checklist
Bug fixes include regression tests
Features include unit/acceptance tests
done