benstepp / ecto_ksuid

Custom type for Ecto to support ksuids
https://hexdocs.pm/ecto_ksuid
MIT License
5 stars 0 forks source link

configuring migration_primary_key & migration_foreign_key can cause an issue. #3

Closed Tzelon closed 2 months ago

Tzelon commented 2 months ago

Hey there, in this guide https://github.com/benstepp/ecto_ksuid/blob/main/guides/using_ksuid_as_default.md it says we need to configure migration_primary_key & migration_foreignkey with name: :id and type: :"char(27)". configuring the name can cause an issue with duplicate constraints. Ecto default behavior is to create a unique name with "#{table}#{column}_fkey".

I would recommend updating the guide and removing the name: :id

Thank you for the library.

benstepp commented 2 months ago

Thanks! I removed the name from the docs for the migration_foreign_key.