Skip to content

Commit 6cd1ff2

Browse files
committed
Avoid duplicate migration table checks
1 parent 454eebe commit 6cd1ff2

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/Repositories/MigrationRepository.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,12 @@ protected function table(): Builder
136136
*/
137137
public function isReady(): bool
138138
{
139-
if (! Schema::connection($this->connection)->hasTable($this->table)) {
140-
$this->create();
139+
if (Schema::connection($this->connection)->hasTable($this->table)) {
140+
return true;
141141
}
142142

143-
return Schema::connection($this->connection)->hasTable($this->table);
143+
$this->create();
144+
145+
return true;
144146
}
145147
}

0 commit comments

Comments
 (0)