Skip to content

Commit 2c80dec

Browse files
committed
Simplify schema existence check in migration
1 parent b784d7d commit 2c80dec

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/Migrations/Version20251028092901MySqlInit.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,8 @@ public function up(Schema $schema): void
3030
);
3131

3232
$schemaManager = $this->connection->createSchemaManager();
33-
$tables = $schemaManager->listTableNames();
34-
$hasUserStats = array_filter(
35-
$tables,
36-
static fn (string $table): bool =>
37-
str_ends_with($table, 'userstats')
38-
);
3933
$this->skipIf(
40-
!empty($hasUserStats),
34+
$schemaManager->tablesExist(['doctrine_migration_versions']),
4135
'phpList schema already exists.'
4236
);
4337

0 commit comments

Comments
 (0)