Relationships belong in the database
Model users, workspaces, memberships, projects, and tasks as related rows.
SQL asks for a set of rows
Read scoped SELECT queries, joins, and parameterized values.
Constraints protect every writer
Understand primary keys, uniqueness, checks, and composite foreign keys.
Drizzle connects TypeScript to SQL
Understand what the schema and query builder guarantee, and what they do not.
A migration changes a running database
Distinguish schema code, migration history, and safe production rollout.
Commit related changes together
Use a transaction to keep a task mutation and its activity record consistent.
A version prevents silent overwrite
Understand optimistic concurrency through two people editing the same task.
Bound the work behind a task list
Connect indexes, ordering, pagination, and query plans.