-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This introduces two commands for dumping and loading the database contents: - `php bin/selfoss db:export path.json` - `php bin/selfoss db:import path.json` Those are useful for testing, as well as for moving data from one database backend to another.
- Loading branch information
Showing
14 changed files
with
414 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
require __DIR__ . '/../src/common.php'; | ||
|
||
use Commands\Database\ExportCommand as DatabaseExportCommand; | ||
use Commands\Database\ImportCommand as DatabaseImportCommand; | ||
use Monolog\Handler\StreamHandler; | ||
use Symfony\Component\Console\Application; | ||
|
||
$application = new Application(); | ||
|
||
$log->popHandler(); | ||
$handler = new StreamHandler('php://stderr'); | ||
$log->pushHandler($handler); | ||
|
||
$application->add($dice->create(DatabaseExportCommand::class)); | ||
$application->add($dice->create(DatabaseImportCommand::class)); | ||
|
||
$application->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.