cohere-coop / nourish.party

Celebrating and nourishing creative communities
Other
6 stars 0 forks source link

Prefer UUIDs for primary keys #44

Closed zspencer closed 6 years ago

zspencer commented 6 years ago

As we intend to be a federated system, we'll want to start with UUIDs for primary keys so we don't have to worry about identity collisions later on.

This configures active record to set the ids UUID for new tables to UUIDs, but there is likely to be other weird things. Such as https://github.com/rails/rails/issues/23422, where using references in migrations doesn't automatically determine the type of the primary key.

I believe the additional risk is worth it to avoid future risks and complexities arising from auto-incrementing primary keys.