Cli
mongorunway.presentation.cli
¤
__all__: typing.Sequence[str] = ('pass_application', 'auditlog', 'create_template', 'cli', 'status', 'walk', 'downgrade', 'upgrade', 'refresh', 'version', 'init', 'safe_remove', 'safe_remove_all', 'check_files', 'refresh_checksums')
module-attribute
¤
auditlog(application, start, end, limit, ascending, verbose_exc, **params)
¤
Display the audit log entries for the specified application.
This command allows you to view the audit log entries for the specified application. You can filter the entries by specifying a start and/or end timestamp or date. The maximum number of entries displayed can be limited, and you can choose to sort the entries in ascending order by date.
Optionally, you can enable verbose output for exceptions that may occur during the audit log command.
Source code in mongorunway\presentation\cli.py
check_files(application, raise_exc, verbose_exc, **params)
¤
Check the integrity of files in the specified application.
This command verifies the integrity of files in the specified application. It compares the checksums of the files stored in the repository with the checksums of the corresponding files in the file system. If any differences are found, an appropriate message is displayed.
Source code in mongorunway\presentation\cli.py
cli()
¤
create_template(application, name, verbose_exc, version=None, **params)
¤
Create a migration template for the specified application.
This command allows you to create a migration template for the specified application. The template can be customized with a name and an optional version number.
Optionally, you can enable verbose output for exceptions during the template creation process.
Source code in mongorunway\presentation\cli.py
downgrade(application, expression, verbose_exc, **params)
¤
Downgrade the specified application.
This command allows you to downgrade the specified application using the given expression or additional arguments. Optionally, you can enable verbose output or verbose output for exceptions during the downgrade process.
Source code in mongorunway\presentation\cli.py
init(application, scripts_dir, collection, indexes, verbose_exc, schema_validation, **params)
¤
Initialize the specified application for migration.
This command allows you to initialize the specified application for migration. You can choose to initialize the scripts directory, collection, indexes, and enable schema validation for the application's collection.
Initializing the scripts directory will create the necessary directory structure for storing migration scripts.
Initializing the collection will create the migration collection in the database.
Initializing the indexes will create the required indexes for the migration collection.
Enabling schema validation will enforce the defined schema on the migration collection.
Note: Use caution when running the init command as it may modify the application's database.
Optionally, you can enable verbose output for exceptions that may occur during the init command.
Source code in mongorunway\presentation\cli.py
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 |
|
pass_application(command)
¤
Source code in mongorunway\presentation\cli.py
refresh(application, verbose_exc, **params)
¤
Refreshes the specified application.
This command refreshes the specified application by performing certain actions. It accepts an APPLICATION_NAME as a required argument and provides an option to enable verbose exception mode using the --verbose-exc flag.
Source code in mongorunway\presentation\cli.py
refresh_checksums(application, verbose_exc, **params)
¤
Refresh the checksums of files in the specified application.
This command updates the checksums of files in the specified application. It recalculates the checksums of all files in the repository and updates them accordingly. This can be useful when the files in the application have been modified or when the checksums need to be synchronized with the repository.
Source code in mongorunway\presentation\cli.py
safe_remove(application, migration_version, verbose_exc, **params)
¤
Safely removes a migration from the specified application.
This command allows you to safely remove a migration from the specified application. It ensures that the removal process is handled securely and provides an option to enable verbose exception output for detailed error messages.
Source code in mongorunway\presentation\cli.py
safe_remove_all(application, verbose_exc, **params)
¤
Safely removes all migrations from the specified application.
This command allows you to safely remove all migrations from the specified application. It ensures that the removal process is handled securely and provides an option to enable verbose exception output for detailed error messages.
Source code in mongorunway\presentation\cli.py
status(application, depth, verbose_exc, **params)
¤
Display the migration status for the specified application.
This command allows you to view the migration status of the specified application. It shows the history of applied migrations up to the specified depth.
Optionally, you can enable verbose output for the status command and verbose output for exceptions that may occur during the status check.
Source code in mongorunway\presentation\cli.py
upgrade(application, expression, verbose_exc, **params)
¤
Upgrade the specified application.
This command allows you to upgrade the specified application using the given expression or additional arguments. Optionally, you can enable verbose output or verbose output for exceptions during the upgrade process.
Source code in mongorunway\presentation\cli.py
version(application, **params)
¤
Display the version information for the specified application.
This command allows you to view the version information of the specified application. It shows details such as the application's name, version number, and other relevant details.
Optionally, you can enable verbose output for the version command to get more detailed information.
Source code in mongorunway\presentation\cli.py
walk(application, expression, verbose_exc, **params)
¤
Walk through the specified application.
This command allows you to perform a walk operation on the specified application using the given expression or additional arguments. The walk operation enables you to traverse the application's structure or perform specific actions.
Optionally, you can enable verbose output or verbose output for exceptions during the walk process.