UNPKG

morpheus4j

Version:

Morpheus is a migration tool for Neo4j. It aims to be a simple and intuitive way to migrate your database.

744 lines 23.4 kB
{ "commands": { "clean": { "aliases": [], "args": {}, "description": "Clean up migration-related database objects\n\n Removes all Morpheus migration metadata including nodes, relationships, and optionally constraints.\n Use with caution as this will reset the migration history.", "examples": [ "<%= config.bin %> clean", "<%= config.bin %> clean --drop-constraints", "<%= config.bin %> clean --config ./custom-config.json" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "debug": { "description": "Enable debug logging", "helpGroup": "GLOBAL", "name": "debug", "allowNo": false, "type": "boolean" }, "drop-constraints": { "description": "Additionally remove all Morpheus-related database constraints", "name": "drop-constraints", "allowNo": false, "type": "boolean" }, "configFile": { "char": "c", "description": "Path to the morpheus file (CWD/morpheus.json by default)", "name": "configFile", "default": "/home/runner/work/morpheus/morpheus/morpheus.json", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "migrationsPath": { "char": "m", "description": "Migrations path. Env: 'MORPHEUS_MIGRATIONS_PATH'", "env": "MORPHEUS_MIGRATIONS_PATH", "name": "migrationsPath", "required": false, "default": "neo4j/migrations", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "host": { "char": "h", "description": "Neo4j host. Env: 'MORPHEUS_HOST'", "env": "MORPHEUS_HOST", "name": "host", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "port": { "char": "p", "description": "Neo4j port. Env: 'MORPHEUS_PORT'", "env": "MORPHEUS_PORT", "name": "port", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "scheme": { "char": "s", "description": "Neo4j scheme. Env: 'MORPHEUS_SCHEME'", "env": "MORPHEUS_SCHEME", "name": "scheme", "required": false, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "password": { "char": "P", "description": "Neo4j password. Env: 'MORPHEUS_PASSWORD'", "env": "MORPHEUS_PASSWORD", "name": "password", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "username": { "char": "u", "description": "Neo4j username. Env: 'MORPHEUS_USERNAME'", "env": "MORPHEUS_USERNAME", "name": "username", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "database": { "char": "d", "description": "Neo4j database. Env: 'MORPHEUS_DATABASE'", "env": "MORPHEUS_DATABASE", "name": "database", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "clean", "pluginAlias": "morpheus4j", "pluginName": "morpheus4j", "pluginType": "core", "strict": true, "enableJsonFlag": true, "isESM": false, "relativePath": [ "dist", "commands", "clean.js" ] }, "create": { "aliases": [], "args": { "name": { "description": "Name of the migration (will be prefixed with a semver number)", "name": "name", "required": true } }, "description": "Generate a new timestamped migration file with boilerplate code", "examples": [ "<%= config.bin %> create add-user-nodes", "<%= config.bin %> create update-relationships -m ~/path/to/migrations", "<%= config.bin %> create update-relationships --config ./custom-config.json" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "configFile": { "char": "c", "description": "Path to the morpheus file (CWD/morpheus.json by default)", "name": "configFile", "default": "/home/runner/work/morpheus/morpheus/morpheus.json", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "migrationsPath": { "char": "m", "description": "Migrations path. Env: 'MORPHEUS_MIGRATIONS_PATH'", "env": "MORPHEUS_MIGRATIONS_PATH", "name": "migrationsPath", "required": false, "default": "neo4j/migrations", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "create", "pluginAlias": "morpheus4j", "pluginName": "morpheus4j", "pluginType": "core", "strict": true, "enableJsonFlag": true, "isESM": false, "relativePath": [ "dist", "commands", "create.js" ] }, "delete": { "aliases": [], "args": { "version": { "description": "The version that should be deleted", "name": "version", "required": true } }, "description": "Delete a migration from the database.\n\n This command can be used to repair broken migration chains. If you accidentally deleted a migration file, you can use this command to find the previous migration and delete it.", "examples": [ "<%= config.bin %> delete 1.0.0", "<%= config.bin %> delete 1.2.3 --config ./custom-config.json", "<%= config.bin %> delete 1.4.0 --dry-run" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "debug": { "description": "Enable debug logging", "helpGroup": "GLOBAL", "name": "debug", "allowNo": false, "type": "boolean" }, "configFile": { "char": "c", "description": "Path to the morpheus file (CWD/morpheus.json by default)", "name": "configFile", "default": "/home/runner/work/morpheus/morpheus/morpheus.json", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "migrationsPath": { "char": "m", "description": "Migrations path. Env: 'MORPHEUS_MIGRATIONS_PATH'", "env": "MORPHEUS_MIGRATIONS_PATH", "name": "migrationsPath", "required": false, "default": "neo4j/migrations", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "host": { "char": "h", "description": "Neo4j host. Env: 'MORPHEUS_HOST'", "env": "MORPHEUS_HOST", "name": "host", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "port": { "char": "p", "description": "Neo4j port. Env: 'MORPHEUS_PORT'", "env": "MORPHEUS_PORT", "name": "port", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "scheme": { "char": "s", "description": "Neo4j scheme. Env: 'MORPHEUS_SCHEME'", "env": "MORPHEUS_SCHEME", "name": "scheme", "required": false, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "password": { "char": "P", "description": "Neo4j password. Env: 'MORPHEUS_PASSWORD'", "env": "MORPHEUS_PASSWORD", "name": "password", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "username": { "char": "u", "description": "Neo4j username. Env: 'MORPHEUS_USERNAME'", "env": "MORPHEUS_USERNAME", "name": "username", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "database": { "char": "d", "description": "Neo4j database. Env: 'MORPHEUS_DATABASE'", "env": "MORPHEUS_DATABASE", "name": "database", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "dry-run": { "description": "Perform a dry run - no changes will be made to the database", "name": "dry-run", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "delete", "pluginAlias": "morpheus4j", "pluginName": "morpheus4j", "pluginType": "core", "strict": true, "enableJsonFlag": true, "isESM": false, "relativePath": [ "dist", "commands", "delete.js" ] }, "info": { "aliases": [], "args": {}, "description": "Info up migration-related database objects\n\n Removes all Morpheus migration metadata including nodes, relationships, and optionally constraints.\n Use with caution as this will reset the migration history.", "examples": [ "<%= config.bin %> info", "<%= config.bin %> info --config ./custom-config.json" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "debug": { "description": "Enable debug logging", "helpGroup": "GLOBAL", "name": "debug", "allowNo": false, "type": "boolean" }, "configFile": { "char": "c", "description": "Path to the morpheus file (CWD/morpheus.json by default)", "name": "configFile", "default": "/home/runner/work/morpheus/morpheus/morpheus.json", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "migrationsPath": { "char": "m", "description": "Migrations path. Env: 'MORPHEUS_MIGRATIONS_PATH'", "env": "MORPHEUS_MIGRATIONS_PATH", "name": "migrationsPath", "required": false, "default": "neo4j/migrations", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "host": { "char": "h", "description": "Neo4j host. Env: 'MORPHEUS_HOST'", "env": "MORPHEUS_HOST", "name": "host", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "port": { "char": "p", "description": "Neo4j port. Env: 'MORPHEUS_PORT'", "env": "MORPHEUS_PORT", "name": "port", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "scheme": { "char": "s", "description": "Neo4j scheme. Env: 'MORPHEUS_SCHEME'", "env": "MORPHEUS_SCHEME", "name": "scheme", "required": false, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "password": { "char": "P", "description": "Neo4j password. Env: 'MORPHEUS_PASSWORD'", "env": "MORPHEUS_PASSWORD", "name": "password", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "username": { "char": "u", "description": "Neo4j username. Env: 'MORPHEUS_USERNAME'", "env": "MORPHEUS_USERNAME", "name": "username", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "database": { "char": "d", "description": "Neo4j database. Env: 'MORPHEUS_DATABASE'", "env": "MORPHEUS_DATABASE", "name": "database", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "info", "pluginAlias": "morpheus4j", "pluginName": "morpheus4j", "pluginType": "core", "strict": true, "enableJsonFlag": true, "isESM": false, "relativePath": [ "dist", "commands", "info.js" ] }, "init": { "aliases": [], "args": {}, "description": "Initialize a new Morpheus configuration file with database connection settings", "examples": [ "<%= config.bin %> init", "<%= config.bin %> init --force", "<%= config.bin %> init --config ./custom-path/morpheus.json", "<%= config.bin %> init --config .config.json --force" ], "flags": { "configFile": { "char": "c", "description": "Path to the morpheus file (CWD/morpheus.json by default)", "name": "configFile", "default": "/home/runner/work/morpheus/morpheus/morpheus.json", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "force": { "char": "f", "description": "Overwrite existing configuration file if it exists", "name": "force", "required": false, "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "init", "pluginAlias": "morpheus4j", "pluginName": "morpheus4j", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": false, "relativePath": [ "dist", "commands", "init.js" ] }, "migrate": { "aliases": [], "args": {}, "description": "Execute pending database migrations in sequential order", "examples": [ "<%= config.bin %> migrate", "<%= config.bin %> migrate -m ~/path/to/migrations", "<%= config.bin %> migrate --config ./custom-config.json", "<%= config.bin %> migrate --dry-run", "<%= config.bin %> migrate --transaction-mode=PER_STATEMENT" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "debug": { "description": "Enable debug logging", "helpGroup": "GLOBAL", "name": "debug", "allowNo": false, "type": "boolean" }, "configFile": { "char": "c", "description": "Path to the morpheus file (CWD/morpheus.json by default)", "name": "configFile", "default": "/home/runner/work/morpheus/morpheus/morpheus.json", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "migrationsPath": { "char": "m", "description": "Migrations path. Env: 'MORPHEUS_MIGRATIONS_PATH'", "env": "MORPHEUS_MIGRATIONS_PATH", "name": "migrationsPath", "required": false, "default": "neo4j/migrations", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "host": { "char": "h", "description": "Neo4j host. Env: 'MORPHEUS_HOST'", "env": "MORPHEUS_HOST", "name": "host", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "port": { "char": "p", "description": "Neo4j port. Env: 'MORPHEUS_PORT'", "env": "MORPHEUS_PORT", "name": "port", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "scheme": { "char": "s", "description": "Neo4j scheme. Env: 'MORPHEUS_SCHEME'", "env": "MORPHEUS_SCHEME", "name": "scheme", "required": false, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "password": { "char": "P", "description": "Neo4j password. Env: 'MORPHEUS_PASSWORD'", "env": "MORPHEUS_PASSWORD", "name": "password", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "username": { "char": "u", "description": "Neo4j username. Env: 'MORPHEUS_USERNAME'", "env": "MORPHEUS_USERNAME", "name": "username", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "database": { "char": "d", "description": "Neo4j database. Env: 'MORPHEUS_DATABASE'", "env": "MORPHEUS_DATABASE", "name": "database", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "dry-run": { "description": "Perform a dry run - no changes will be made to the database", "name": "dry-run", "allowNo": false, "type": "boolean" }, "transaction-mode": { "description": "Transaction mode", "name": "transaction-mode", "default": "PER_MIGRATION", "hasDynamicHelp": false, "multiple": false, "options": [ "PER_MIGRATION", "PER_STATEMENT" ], "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "migrate", "pluginAlias": "morpheus4j", "pluginName": "morpheus4j", "pluginType": "core", "strict": true, "enableJsonFlag": true, "isESM": false, "relativePath": [ "dist", "commands", "migrate.js" ] }, "validate": { "aliases": [], "args": {}, "description": "Validate migration state between local files and database\n\n Validates that all migrations in the migrations folder have been applied to the database\n in the correct order and with matching checksums. Reports discrepancies.", "examples": [ "<%= config.bin %> validate", "<%= config.bin %> validate -m ~/path/to/migrations", "<%= config.bin %> validate --config ./custom-config.json", "<%= config.bin %> validate --fail-fast", "<%= config.bin %> validate --summary-only", "<%= config.bin %> validate --output-file=validation-report.json", "<%= config.bin %> validate --debug" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "debug": { "description": "Enable debug logging", "helpGroup": "GLOBAL", "name": "debug", "allowNo": false, "type": "boolean" }, "configFile": { "char": "c", "description": "Path to the morpheus file (CWD/morpheus.json by default)", "name": "configFile", "default": "/home/runner/work/morpheus/morpheus/morpheus.json", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "migrationsPath": { "char": "m", "description": "Migrations path. Env: 'MORPHEUS_MIGRATIONS_PATH'", "env": "MORPHEUS_MIGRATIONS_PATH", "name": "migrationsPath", "required": false, "default": "neo4j/migrations", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "host": { "char": "h", "description": "Neo4j host. Env: 'MORPHEUS_HOST'", "env": "MORPHEUS_HOST", "name": "host", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "port": { "char": "p", "description": "Neo4j port. Env: 'MORPHEUS_PORT'", "env": "MORPHEUS_PORT", "name": "port", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "scheme": { "char": "s", "description": "Neo4j scheme. Env: 'MORPHEUS_SCHEME'", "env": "MORPHEUS_SCHEME", "name": "scheme", "required": false, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "password": { "char": "P", "description": "Neo4j password. Env: 'MORPHEUS_PASSWORD'", "env": "MORPHEUS_PASSWORD", "name": "password", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "username": { "char": "u", "description": "Neo4j username. Env: 'MORPHEUS_USERNAME'", "env": "MORPHEUS_USERNAME", "name": "username", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "database": { "char": "d", "description": "Neo4j database. Env: 'MORPHEUS_DATABASE'", "env": "MORPHEUS_DATABASE", "name": "database", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "fail-fast": { "description": "Exit with error code on first validation failure", "name": "fail-fast", "allowNo": false, "type": "boolean" }, "output-file": { "char": "o", "description": "Write detailed validation results to a JSON file", "name": "output-file", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "summary-only": { "description": "Show only the summary of validation failures", "name": "summary-only", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "validate", "pluginAlias": "morpheus4j", "pluginName": "morpheus4j", "pluginType": "core", "strict": true, "enableJsonFlag": true, "isESM": false, "relativePath": [ "dist", "commands", "validate.js" ] } }, "version": "4.5.2" }