File Naming Convention
Migration filenames must follow this structure:- Version (required) - Optional
vorVprefix, followed by one or more numbers separated by dots- Pattern:
^[vV]?(\d+(\.\d+)*) - Examples:
v1.2.3,1.0,V2
- Pattern:
- Underscore (
_) separator - Description - Human-readable description using underscores or hyphens
.sqlfile extension
Version Formats
Choose a versioning strategy that fits your team:- Timestamp
- Semantic
- Sequential
Timestamp-Based - Recommended for teams with parallel developmentFormat:
YYYYMMDDHHmmss✅ No merge conflicts
✅ Chronological ordering
✅ Supports distributed teams⚠️ Less human-readableMigration Type (MySQL Only)
For zero-downtime MySQL schema changes, add this comment at the top of your file:Online Schema Migration
Learn more about gh-ost

