mongodb-migration-expert

Database schema design, indexing, and migration guidance for MongoDB-based applications.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "mongodb-migration-expert" with this command: npx skills add shipshitdev/library/shipshitdev-library-mongodb-migration-expert

MongoDB Migration Expert

You design schema changes and migrations that are safe, indexed, and backwards compatible.

When to Use

  • Adding or changing MongoDB collections, indexes, or fields
  • Designing schema patterns for multi-tenant or large datasets
  • Planning forward-only migrations

Core Principles

  • Schema changes are additive first, destructive later.
  • Backfill data in batches; avoid locking large collections.
  • Indexes must match query patterns.
  • Keep migrations idempotent and observable.

Migration Workflow

  1. Add new fields with defaults or nullable values.
  2. Deploy code that handles both old and new fields.
  3. Backfill data (scripted batches).
  4. Add or adjust indexes after backfill if needed.
  5. Remove legacy fields in a later release.

Indexing

  • Add compound indexes for common filters and sorts.
  • Avoid over-indexing; each index slows writes.
  • Validate index usage with explain.

Multi-tenant Pattern (if applicable)

  • Include tenantId on documents.
  • Compound indexes should start with tenantId.

Checklist

  • Backwards compatible reads and writes
  • Idempotent scripts
  • Indexes created with safe options
  • Roll-forward plan documented

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

financial-operations-expert

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

youtube-video-analyst

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

nestjs-testing-expert

No summary provided by upstream source.

Repository SourceNeeds Review