Skip to content

Commit

Permalink
Merge pull request #154 from Muffinman/delete-if-exists
Browse files Browse the repository at this point in the history
Add deleteIfExists() method to migrator
  • Loading branch information
rubenvanassche authored Sep 28, 2022
2 parents 43666ee + 4cb72c9 commit f16a8d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Migrations/SettingsMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ public function delete(string $property): void
$this->deleteProperty($property);
}

public function deleteIfExists(string $property): void
{
if ($this->checkIfPropertyExists($property)) {
$this->deleteProperty($property);
}
}

public function update(string $property, Closure $closure, bool $encrypted = false): void
{
if (! $this->checkIfPropertyExists($property)) {
Expand Down

0 comments on commit f16a8d2

Please sign in to comment.