Database Setup
Includes RLS policies, indexes, and type generation alongside table definitions. This produces a secure, performant database setup instead of just bare table creation.
Set up the Supabase database for this application:\n\nTables:\n1. {{table_1}}\n - id (UUID, primary key, auto-generated)\n - {{table_1_fields}}\n - user_id (UUID, foreign key to auth.users)\n - created_at (timestamp with timezone, default now())\n - updated_at (timestamp with timezone)\n\n2. {{table_2}}\n - id (UUID, primary key, auto-generated)\n - {{table_2_fields}}\n - {{table_1}}_id (UUID, foreign key)\n - created_at, updated_at\n\nRow Level Security:\n- Users can only read/write their own {{table_1}} rows (WHERE user_id = auth.uid())\n- Users can read/write {{table_2}} rows that belong to their {{table_1}}\n\nIndexes: Add indexes on user_id, {{table_1}}_id, and any field used for sorting or filtering.\n\nGenerate the corresponding TypeScript types and Supabase query functions for CRUD operations on each table.
Variables to customize
Why this prompt works
Includes RLS policies, indexes, and type generation alongside table definitions. This produces a secure, performant database setup instead of just bare table creation.
What you get when you save this prompt
Your workspace unlocks powerful tools to iterate and improve.
AI Optimization
One-click improvement with structure analysis and pattern suggestions.
Version History
Track every edit. Compare versions side-by-side with word-level diffs.
Folders & Tags
Organize your library with nested folders, tags, and drag-and-drop.
$ npm i -g @promptingbox/mcpUse Everywhere
Access prompts from Claude, Cursor, ChatGPT & more via MCP integration.
Your prompts, organized
Save, version, and access your best prompts across ChatGPT, Claude, Cursor, and more.