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
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
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.
Go further
Similar Prompts
Actionable SWOT Analysis
For annual strategic planning or before a fundraising round
Stock and inventory data analysis
Complete inventory data analysis with ABC/XYZ classification, threshold calculations, and working capital optimization.
Retention Analysis
Improve user retention
Engineer date features
Extract features from datetime columns