// 21 tips tagged "database"
Pipe your SQL DDL or Laravel migrations to Claude and get a complete Prisma schema back — foreign keys become relations, enums map correctly, and @@map attributes preserve your existing table names.
Scaffold single-database or database-per-tenant multi-tenancy in Laravel with global scopes, middleware, queue context, and tenant-aware caching.
Ask Claude to read your migrations and output a Mermaid ER diagram — it renders natively in GitHub, Notion, and most wikis with zero extra tooling.
Soft deletes let you recover accidentally deleted records and maintain audit trails — Claude handles the migration, model changes, and query scoping in one shot.
Forgetting to wrap related database writes in a transaction is a classic source of data corruption. Ask Claude to audit your codebase and fix the boundaries.
Stop hand-crafting complex SQL — describe the logic you need and let Claude write the view or stored procedure, complete with a migration file.
Offset pagination breaks at scale. Cursor-based pagination is the right approach — and Claude can implement it in any framework from a plain-English description.
Paste your Eloquent model into Claude and get back a complete Filament v3 resource with form fields, table columns, filters, and a RelationManager stub.
Describe your data model in plain English and let Claude generate a complete Prisma schema with relations, indexes, and enums — ready to migrate.
Describe your data model in plain English and get back ActiveRecord models, associations, validations, and migration files ready to run.
Describe your domain and let Claude design an event sourcing implementation with event classes, a store interface, and aggregate reconstruction logic.
Ask Claude to write streaming CSV and Excel exports that use LazyCollection to handle large datasets without memory spikes — plus queued exports and email delivery for very large result sets.