Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't sort identity keys when creating unique indexes #313

Closed
joseph-lozano opened this issue Jun 1, 2024 · 0 comments
Closed

Don't sort identity keys when creating unique indexes #313

joseph-lozano opened this issue Jun 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@joseph-lozano
Copy link

Describe the bug
When creating an identity with multiple keys, unique_indexes should have the same key order as defined by the user.

To Reproduce
An identity with multiple keys not in alphabetical order:

identities do
  identity :unique_name_per_user, [:user_id, :name]
end

Run mix ash_postgres.generate_migrations

Verify that the generated migration has they keys on the unique index in a different order

Expected behavior
The generated index should have the same order
** Runtime

  • elixir 1.16.2
  • erlang 26.2.4
  • Macos
  • :ash, "~> 3.0"
  • :ash_postgres, "~> 2.0"

Additional context
N/A

@joseph-lozano joseph-lozano added bug Something isn't working needs review labels Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants