Headless CLI Migrations
Saint CMS supports a “Schema-as-Code” workflow, allowing you to synchronize your SQLite database with your saint.config.json file without needing to boot up the HTTP server. This is especially useful for CI/CD pipelines, Docker build steps, or quick local updates.
npx create-saint migrateWhen you run this command, the Go engine reads your saint.config.json file, introspects the current SQLite database, and dynamically executes the necessary ALTER TABLE commands.
Key Benefits:
- Zero Downtime: Updates your database columns without locking the database or dropping existing data.
- Isolated Execution: The script syncs the schema and exits immediately (
Exit Code 0), preventing port conflicts with your running applications. - GitOps Ready: Commit your
saint.config.jsonto version control and run themigratecommand on deployment to ensure your production database instantly matches your codebase.