mikro-orm

TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite databases

Subcommands

NameDescription
cache:clearClear metadata cache
cache:generateGenerate metadata cache for production
generate-entitiesGenerate entities based on current database schema
database:createCreate your database if it does not exist
database:importImports the SQL file to the database
seeder:runSeed the database using the seeder class
seeder:createCreate a new seeder class
schema:createCreate database schema based on current metadata
schema:dropDrop database schema based on current metadata
schema:updateUpdate database schema based on current metadata
schema:freshDrop and recreate database schema based on current metadata
migration:createCreate new migration with current schema diff
migration:upMigrate up to the latest version
migration:downMigrate one step down
migration:listList all executed migrations
migration:pendingList all pending migrations
migration:freshClear the database and rerun all migrations
debugDebug CLI configuration

Options

NameDescription
-v, --versionShow version number
-h, --helpShow help