Command-line interface tool for MikroORM TypeScript ORM providing database management, migrations, schema operations, and entity generation
—
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Pending
The risk profile of this skill
MikroORM CLI database management commands for core database operations including creation and SQL import functionality.
Creates the database if it doesn't exist. Useful for initial setup and CI/CD pipelines.
/**
* Create database command
*/
command: "database:create"
// No additional options beyond global optionsUsage Examples:
# Create database with default configuration
mikro-orm database:create
# Create database with specific config file
mikro-orm database:create --config ./orm.config.js
# Create database for specific context
mikro-orm database:create --context productionImports SQL file contents directly into the database. Supports multiple SQL statements and database-specific SQL syntax.
/**
* Import SQL file command
*/
command: "database:import <file>"
interface ImportOptions extends BaseArgs {
file: string; // Path to SQL file to import (required positional argument)
}Usage Examples:
# Import SQL file
mikro-orm database:import ./schema.sql
# Import with specific configuration
mikro-orm database:import ./data.sql --config ./orm.config.js
# Import for specific context
mikro-orm database:import ./init.sql --context developmentNo additional arguments required beyond global options.
<file>: Required positional argument specifying the path to the SQL file to importAll database commands support:
--config: Path to ORM configuration file(s)--contextName / --context: Configuration context nameThese commands work with:
Database commands work with these MikroORM configuration options:
interface DatabaseConfiguration {
driver: string; // Database driver type
clientUrl?: string; // Connection string
host?: string; // Database host
port?: number; // Database port
user?: string; // Database user
password?: string; // Database password
dbName: string; // Database name
multipleStatements?: boolean; // Enable multiple SQL statements (for import)
}