CLI
jsorm exposes a CLI for schema SQL generation, runtime health checks, and migration orchestration.
Generation commands
Section titled “Generation commands”jsorm migration ./dist/schema.js initialMigrationjsorm create-table ./dist/schema.js UserRuntime commands
Section titled “Runtime commands”jsorm migrate ./dist/schema.js ormSourcejsorm migrate:up ./dist/schema.js ormSourcejsorm migrate:down ./dist/schema.js ormSourcejsorm migrate:status ./dist/schema.js ormSourcejsorm db:check ./dist/schema.js connectionSourcejsorm fresh ./dist/schema.js ormSourcejsorm rollback ./dist/schema.js ormSourceEnvironment safety
Section titled “Environment safety”- safe in production:
migrate,migrate:up,migrate:status,db:check - guarded in production:
migrate:downrequires explicit unsafe override - blocked in production:
fresh,rollback
Best practices
Section titled “Best practices”- Export connection and migration sources from stable modules.
- Use
db:checkin CI and deploy verification flows. - Keep destructive commands out of production automation by default.