$ recombobulate _
~/recombobulate $ tip --list --tag="database"

// 36 tips tagged "database"

107
Ask Claude to Generate Realistic Factory Definitions and Seed Data for Your Models

Tell Claude to read your models, migrations, and relationships, then generate factory definitions that produce realistic, interconnected test data — proper names, valid emails, sensible dates, correct foreign keys, and state variations that cover your actual business logic.

recombobulate @recombobulate · 1 month ago
161
Ask Claude to Find and Fix the Performance Bottleneck in a Slow Endpoint

When a page takes five seconds to load or an API endpoint times out under load, tell Claude which route is slow and it traces the entire code path — controller, services, queries, loops — identifying N+1 queries, redundant computations, missing indexes, and cacheable operations, then fixes each bottleneck.

recombobulate @recombobulate · 1 month ago
138
Describe the Data You Need in Plain English and Let Claude Write the Query

Tell Claude what data you need — "all users who signed up this month but haven't made a purchase" — and it reads your schema, understands the relationships, and writes the query in your framework's query builder or raw SQL, with the right joins, conditions, and aggregations.

recombobulate @recombobulate · 1 month ago
85
Describe a Database Change in Plain English and Let Claude Write the Migration

Instead of memorizing migration syntax, describe the schema change you need — "add a nullable published_at timestamp to the posts table" or "create a many-to-many relationship between users and roles" — and Claude writes the complete migration file using your framework's conventions.

recombobulate @recombobulate · 1 month ago
132
Ask Claude to Sanitize Data by Replacing Real Values with Realistic Fakes

When you need to share sample data, create test fixtures, or debug with production-like records, tell Claude to sanitize the data — replacing real names, emails, phone numbers, and IDs with realistic fakes while keeping the structure, relationships, and data types intact.

recombobulate @recombobulate · 1 month ago
85
Paste a Slow Query's EXPLAIN Output and Let Claude Optimize It

When a specific query is slow, run EXPLAIN on it and paste the execution plan into Claude — it reads the plan, spots full table scans, bad join orders, and missing indexes, then rewrites the query and suggests schema changes to make it fast.

recombobulate @recombobulate · 1 month ago
204
Describe Schema Changes in English and Let Claude Write the Migration

Tell Claude what you need — "add a tagging system where posts can have multiple tags" — and it writes the migration, creates the pivot table, adds the model relationships, and updates the relevant files, all from a plain English description of your schema change.

recombobulate @recombobulate · 1 month ago
109
Ask Claude to Generate Realistic Seed Data and Test Factories from Your Models

Tell Claude to read your models and database schema, then generate factory definitions and seed data that actually make sense — proper relationships, realistic values, domain-appropriate formats, and edge cases, not random strings and lorem ipsum.

recombobulate @recombobulate · 1 month ago
104
Describe Your Data Needs in English and Let Claude Write the SQL

Tell Claude what data you need — "monthly revenue by product category, excluding refunds, for the last quarter" — and it reads your schema, writes the query with proper joins and aggregations, and explains what each part does so you can verify it's correct.

recombobulate @recombobulate · 1 month ago
141
Ask Claude to Suggest Database Indexes Based on Your Query Patterns

Tell Claude to read your queries, ORM calls, and WHERE clauses, then suggest which database indexes to add — it identifies missing indexes that would speed up slow queries, flags redundant indexes wasting write performance, and generates the migration to add them.

recombobulate @recombobulate · 1 month ago
116
Ask Claude to Add Input Validation That Matches Your Database Schema

Tell Claude to read your database schema and models, then add input validation to your API endpoints and forms — column types become type checks, NOT NULL becomes required, string lengths become max rules, and foreign keys become exists checks, all derived from the actual constraints.

recombobulate @recombobulate · 1 month ago
149
Ask Claude to Write Data Migration Scripts for Backfills and Cleanups

When you need to transform existing data — backfill a new column, clean up inconsistent formats, merge duplicate records, or split a field into parts — describe the transformation in English and Claude writes a safe, reversible migration script.

recombobulate @recombobulate · 1 month ago