Ash FrameworkAF
Ash Framework3y ago
12 replies
Blibs

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:

  identities do
    identity :unique_email, [:email] do
      eager_check_with FeedbackCupcake.Accounts
    end

    identity :unique_referral_code, [:referral_code]
  end


And in my Customer resource, I have these identities:

  identities do
    identity :unique_customer_id, [:customer_id]
  end


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.
Was this page helpful?