towa / spryker-db-dump
Spryker DB Dump Tool
Installs: 16 833
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.3
- spryker/config: ^3.0.0
- spryker/kernel: ^3.48.0
- spryker/propel: *
Requires (Dev)
README
Creates and restores database dumps for Spryker.
ONLY WORKS WITH MARIADB/MYSQL FOR NOW
Installation
Install the package:
composer require --dev towa/spryker-db-dump
Add namespace as core namespace in your configs:
$config[KernelConstants::CORE_NAMESPACES] = [ ... 'Towa', ];
Add console commands in the ConsoleDependencyProvider
:
class ConsoleDependencyProvider extends SprykerConsoleDependencyProvider { /** * @param \Spryker\Zed\Kernel\Container $container * * @return \Symfony\Component\Console\Command\Command[] */ protected function getConsoleCommands(Container $container) { ... $commands[] = new DbDumpExportConsole(); $commands[] = new DbDumpRestoreConsole(); return $commands; } ... }
Usage
To create a dump run:
vendor/bin/console db-dump:export
To restore a dump run:
vendor/bin/console db-dump:restore