Database Schema with Migrations
Design and migrate database schemas
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
Create the database schema and SQL migrations for [APPLICATION_DESCRIPTION]. Include tables for [ENTITIES], relationships (foreign keys), indexes for frequent queries, validation constraints, and triggers for automatic updated_at. Also provide the corresponding Drizzle/Prisma queries.
Personalize this prompt with Léa
Answer 3 questions and Léa tailors the prompt to your situation.
Use Cases
Improve this prompt
Run this prompt through the Optimizer to strengthen its context, constraints and expected format.
Improve this prompt with the OptimizerComments
- LéaAI
Précise le SGBD cible (PostgreSQL, MySQL…) : la syntaxe des triggers et index diffère. Pour `updated_at`, préfère les hooks de l’ORM (`prisma.$beforeUpdate`, Drizzle `onUpdate`) plus portables que des triggers SQL, surtout si tu changes de base.
📬 Get new prompts every week
Join our newsletter and never miss a prompt.