We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a12430e commit 9e535faCopy full SHA for 9e535fa
src/Commands/Create.php
@@ -21,7 +21,11 @@ public function handle()
21
?: config('db-snapshots.default_connection')
22
?? config('database.default');
23
24
- $snapshotName = $this->argument('name') ?? Carbon::now()->format('Y-m-d_H-i-s');
+ if (! is_null($this->option('connection')) && is_null($this->argument('name'))) {
25
+ $snapshotName = $this->option('connection') . "_" . Carbon::now()->format('Y-m-d_H-i-s');
26
+ } else {
27
+ $snapshotName = $this->argument('name') ?? Carbon::now()->format('Y-m-d_H-i-s');
28
+ }
29
30
$compress = $this->option('compress') || config('db-snapshots.compress', false);
31
0 commit comments