Store
=====
Id int
Col1 varchar
Col2 varchar
Col3 varchar
...
Col134 varchar
foreignKey1 varchar
foreignKey1Type varchar
foreignKey2 varchar
foreignKey2Type varchar
...
foreignKey10 varchar
foreignKey10Type varchar
validFrom varchar
validTo varchar
isActive boolean
deleted booleanAnd there’s a multitude of ways to soft-delete too!
This is much better than some schemas I’ve seen.
Eg, over a month of iterations: "Can we add another field to user registration? It should be free text. Oh, they should select from a list. No wait, make it a date. Actually a date and a text field. No wait, dump the text field."
Sometimes slowing down these changes is a good thing. But often, being able to ship each iteration along the way will help your design team converge on the best solution. If you need to write a schema migration for every iteration, it kills the ability of your team to experiment and explore the space of "what should our product actually look like".
Faster iterations = more iterations = better product in the long term. Sometimes the best long term result requires some random stuff getting crammed into a big JSON field in your database in the short term.
No it isn't. That's the model for the representation of the actual domain model. The actual domain model may well be "idk everything" (then you're SOL) or it just may not be formalized (then you might want to fix that).
The rest of the UI, I can figure out by myself.
~ Fred Brooks, “The Mythical Man Month”
Stuff that has improved or the potential to improve the documentability of modern systems, imo: postgREST, custom types (e.g. domains in postgresql), more expressive type systems e.g. rust, haskell, typescript perhaps (though I am not completely sold on typescript yet myself) nix/nixos (or more mainstream, hashicorp products/ansible/puppet/docker) kubernetes and co. (most people probably don't need)