migration-writing

Write database migrations that safely modify schema while preserving data integrity.

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 "migration-writing" with this command: npx skills add vihang-hub/integrated-sdlc-framework/vihang-hub-integrated-sdlc-framework-migration-writing

Migration Writing

Purpose

Write database migrations that safely modify schema while preserving data integrity.

When to Use

  • New table/column additions

  • Schema modifications

  • Index changes

  • Data transformations

Process

  • Plan migration

  • Write forward migration

  • Write rollback (if needed)

  • Test in development

  • Test with production-like data

StudyAbroad-Specific Considerations

  • Always have rollback plan

  • Test with realistic data volumes

  • Consider GDPR (soft deletes)

  • Handle production data carefully

Examples

// prisma/migrations/20240115_add_virus_scan/migration.sql

-- Add virus scan fields to documents table ALTER TABLE documents ADD COLUMN virus_scan_status VARCHAR(20) DEFAULT 'pending', ADD COLUMN virus_scan_at TIMESTAMP, ADD COLUMN virus_scan_result JSONB;

-- Create index for pending scans CREATE INDEX idx_documents_scan_pending ON documents (virus_scan_status) WHERE virus_scan_status = 'pending';

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.

General

error-handling-design

No summary provided by upstream source.

Repository SourceNeeds Review
General

test-data-generation

No summary provided by upstream source.

Repository SourceNeeds Review
General

penetration-testing

No summary provided by upstream source.

Repository SourceNeeds Review
General

progress-tracking

No summary provided by upstream source.

Repository SourceNeeds Review