I have fixed enough broken systems to know where most of them broke first: the schema.
Developers rush to write application code. The schema gets designed in 20 minutes with VARCHAR(255) columns where there should be enums, nullable foreign keys where there should be constraints, and no indexes where there should be five.
Six months and 50,000 records later: 40-second queries, inconsistent data, reports that do not balance, and a migration that terrifies everyone.
Spend three hours on the schema before you write a single line of application code. Draw it. Normalise it. Challenge every nullable column.
The schema is the constitution of your data. Bad constitutions produce bad governments.
— Dick Bassey | DevDick | 2012