The schema is the truth
Every application is, at its core, a set of transformations applied to data. The UI is a view. The API is an interface. But the schema is the truth of what your system believes about the world.
When I take on a new project, the first artifact I produce is not a wireframe or a component tree. It is an entity-relationship diagram — even a rough one sketched on paper. I want to understand what things the system knows about, how those things relate to each other, and what facts it needs to record.
Constraints are features
A NOT NULL constraint, a UNIQUE index, a foreign key — these are not implementation details. They are business rules encoded directly into the database engine. The further a constraint lives from the data, the easier it is to violate.
I have inherited too many codebases where validation lived exclusively in the application layer, and the database was a free-for-all. Orphaned records, duplicate emails, null values in columns the business assumed were always populated. Schema-level constraints prevent entire categories of bugs before you write a single test.
Design for queries, not inserts
The shape of your data should be driven by how you need to read it, not just how you write it. If you will always load a post with its tags, model that relationship explicitly. If you will frequently filter subscribers by status, index that column.
Start with the queries the product requires. Work backwards to the schema that makes those queries fast and simple. The insert path is almost always easy; it is the read path that reveals whether your model is right.
Change is inevitable — make it safe
No schema survives contact with production unchanged. The question is not whether you will migrate, but whether your migrations are reversible and your team trusts the process.
I write every migration with a down() method. I run migrations against a copy of production data before deploying. I version-control every schema change alongside the application code that depends on it.
The data model is the hardest thing to change once a system is live. Getting it right early is the highest-leverage investment you can make.