Skip to content

Commit d2c4f35

Browse files
Added to readme, bumped phpunit minimum version
1 parent 8b72b62 commit d2c4f35

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ return [
8282
* The directory where temporary files will be stored.
8383
*/
8484
'temporary_directory_path' => storage_path('app/laravel-db-snapshots/temp'),
85+
86+
/*
87+
* Create dump files that are gzipped
88+
*/
89+
'compress' => false,
8590
];
8691
```
8792

@@ -100,6 +105,13 @@ Giving your snapshot a name is optional. If you don't pass a name the current da
100105
php artisan snapshot:create
101106
```
102107

108+
When creating snapshots, you can optionally create compressed snapshots. To do this either pass the `--compress` option on the command line, or set the `db-snapshots.compress` configuration option to `true`:
109+
110+
```bash
111+
# Creates a snapshot named my-compressed-dump.sql.gz
112+
php artisan snapshot:create my-compressed-dump --compress
113+
```
114+
103115
After you've made some changes to the database you can create another snapshot:
104116

105117
```bash

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"require-dev": {
2727
"mockery/mockery": "^0.9.8",
2828
"orchestra/testbench": "^3.4.10",
29-
"phpunit/phpunit": "^6.2 || ^7.0"
29+
"phpunit/phpunit": "^6.5 || ^7.0"
3030
},
3131
"autoload": {
3232
"psr-4": {

src/SnapshotFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected function getDbDumper(string $connectionName): DbDumper
6868
return $factory::createForConnection($connectionName);
6969
}
7070

71-
protected function createDump(string $connectionName, string $fileName, FilesystemAdapter $disk, bool $compress)
71+
protected function createDump(string $connectionName, string $fileName, FilesystemAdapter $disk, bool $compress = false)
7272
{
7373
$directory = (new TemporaryDirectory(config('db-snapshots.temporary_directory_path')))->create();
7474

0 commit comments

Comments
 (0)