Production Schema Step 2: Fix the Types

Go through every column in your schema and choose the type deliberately. Every money column to numeric, every moment to timestamptz, every day to date, every flag to boolean. Then add the constraints Postgres allows that SQLite did not: a CHECK spanning columns, a UNIQUE across a combination, and a partial unique index if your data has one of those cases. For each, write the one-line rule it enforces, in English, above it.

SANKOFA SANDBOX
loading editor…
Your turn → Work through it step by step. This is a piece of the course project, not a throwaway exercise.

Built it in both languages?

Mark it done once your Python and JavaScript versions both run correctly. Honesty here is what makes the dashboard useful to you.

← BackNext: Module 3: Migrating to PostgreSQL →