Create SQL migration files following naming conventions that enable proper version tracking and execution order.Documentation Index
Fetch the complete documentation index at: https://docs.bytebase.com/llms.txt
Use this file to discover all available pages before exploring further.
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:{} to run with default flags, or pass gh-ost flags as a JSON object:
Online Schema Migration
Learn more about gh-ost
Next Steps
SQL Review CI
Set up automated validation in your CI/CD pipeline
Release
Deploy your migrations to databases

