this post was submitted on 03 Aug 2024
12 points (100.0% liked)

PostgreSQL

677 readers
1 users here now

The world's most advanced open source relational database

Project
Events
Podcasts
Related Fediverse communities

founded 2 years ago
MODERATORS
12
submitted 4 months ago* (last edited 4 months ago) by jnovinger to c/postgresql
top 1 comments
sorted by: hot top controversial new old
[–] towerful 1 points 4 months ago

I feel like a lot of the complication of this story was from using rails to try and develop the implementation of adding a primary key to the database.
Initially testing via SQL would've quickly blown through the null and default requirements, after which it's just translating into whatever ORM you are using, testing and deploying.

I know a lot of ORMs make it super easy to quicky add a migration in a language you already know well. But primary keys are pretty core to tables, and probably something assumed to be set up when first creating the table (ie rails did auto-magick with the new id column).