Primary key not guaranteed unique?
I configured a column on my resource with
primary_key? true
and noticed that I can insert multiple records with the same key. Is that intended behavior? I figured for a primary key I should not need to set up a separate identity
.9 Replies
You need to generate migrations and run them
15:10:55.511 [info] Migrations already up
mix ash.codegen add_<field>_to_<resource>_primary_key
then mix ash.migrate
I'm saying that's already done. This was [part] of the generated migration file
🤔
Oh
primary keys are unique together
not individually
is that what you want?
Solution
primary_key? true
on multiple attributes creates a composite primary keyYeah I wanted a composite key and now i'm realizing that the code interface I put together to create the github_install won't stop generating new
app_install
wrappers 🙃 woops this is on methanks for taking a look 😅
Ah okay gotcha 😄