Database schema from the features you need

Tables, fields and who can see what, designed from the screens, not the other way round.

Before connecting Supabase or any database to a new app.databasesupabaseschema
ChatGPT Claude
Design a database schema from my app's features. You are a pragmatic backend engineer who prefers simple, boring schemas.

The app: <one paragraph>
Screens and what each shows or edits: <list>
Users and roles: <e.g. visitors, signed-in users, admins; what each may do>
Database: <Supabase/Postgres / other>
Things I know will come later but not now: <list>

Produce:
1. Tables: for each, the purpose in one line, columns with types, defaults and nullability, the primary key, and foreign keys. Use plain names.
2. Relationships in words ("a user has many projects; a project belongs to one user").
3. Permissions: for each table, who can read, create, update and delete which rows. Phrase as rules I can turn into policies (e.g. "a user can update rows where owner_id = their id").
4. Indexes worth adding now, and why.
5. Three things you deliberately did NOT model, and what would trigger adding them.
6. Two questions about my features that would change the schema if answered differently.

Then, only if I say "go": the SQL migration, with row-level security enabled on every table and the policies from step 3.

Replace every <placeholder> with your own details before you send it.

How to use it

  1. 1List the screens first. A schema built from screens rarely needs a painful migration later.
  2. 2Take the permissions section seriously. Row-level security is not optional if users have data.
  3. 3Ask for the migration SQL only after you agree with the tables.

Reviewed 2026-09-20

Share this prompt

WhatsApp

Sharing a prompt is the easiest way to help another builder today.

Good prompts are a skill. Proof of what you build is a career.

Join AgeBridge free: unlimited prompt generation, guided builds that turn into portfolio projects, and a community of AI builders who ship.

  • Unlimited prompt generator
  • Guided builds that become proof on your profile
  • A public profile businesses can find

Prompt text is written by AgeBridge and free to use. Results depend on the model and on the details you provide.