Migration
The CLI and Studio share the same migration engine: project source → AST loader → registry → schema blueprint → dialect-specific SQL → migration repository.
Workflow#
ctg make:migration create_products_table
ctg migrate:status
ctg migrateReview the generated files in database/migrations/ before applying schema changes.
Rollback and destructive operations#
ctg migrate:rollbackmigrate:reset and migrate:fresh are also available. Both can remove structures or data; understand the changes and prepare backups before using them. Destructive commands require --force in production. This flag does not replace review or backups.
Deployment verification#
ctg db:check
ctg migrate:statusRun migrations through a controlled deployment procedure before verifying application health.
Versioned sources v5.0.0: cli/migration.go · docs/ARCHITECTURE.md · docs/PRODUCTION.md.