-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an event that reports files being deleted when calling the `sch…
…ema:dump --prune` command
- Loading branch information
1 parent
32b95e9
commit 2472b49
Showing
2 changed files
with
49 additions
and
1 deletion.
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,45 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Illuminate\Database\Events; | ||
|
||
use Illuminate\Database\Connection; | ||
|
||
class SchemaPruned | ||
{ | ||
/** | ||
* The database connection instance. | ||
* | ||
* @var \Illuminate\Database\Connection | ||
*/ | ||
public Connection $connection; | ||
|
||
/** | ||
* The database connection name. | ||
* | ||
* @var string | ||
*/ | ||
public ?string $connectionName; | ||
|
||
/** | ||
* Path to the deleted directory. | ||
* | ||
* @var string | ||
*/ | ||
public string $path; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param \Illuminate\Database\Connection $connection | ||
* @param string $path | ||
* @return void | ||
*/ | ||
public function __construct(Connection $connection, string $path) | ||
{ | ||
$this->connection = $connection; | ||
$this->connectionName = $connection->getName(); | ||
$this->path = $path; | ||
} | ||
} |