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
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
- 1List the screens first. A schema built from screens rarely needs a painful migration later.
- 2Take the permissions section seriously. Row-level security is not optional if users have data.
- 3Ask for the migration SQL only after you agree with the tables.
Reviewed 2026-09-20
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
Related prompts
Vibe Coding
Write the spec before the first prompt
One page the AI can actually follow: screens, data, rules, and what's out.
You are a product engineer who writes specs that AI coding tools can follow without guessing. Help me write a one-page spec before I build…
Open prompt
Vibe Coding
Make the AI plan before it writes code
Files, steps and risks first. Code only after you say go.
Before writing any code, plan this change and stop for my approval. The change I want: <describe the feature or fix> Where it lives:…
Open prompt
Vibe Coding
Debug without guessing
Reproduce, isolate, prove the cause, then fix. In that order.
Help me debug this systematically. No fixes until the cause is proven. What I expected: <the behaviour that should happen> What actually…
Open prompt
Prompt text is written by AgeBridge and free to use. Results depend on the model and on the details you provide.