Skip to content

Commit f3b8b32

Browse files
committed
fix: streamline database setup by removing redundant table drops in test case.
1 parent 80be5fc commit f3b8b32

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

tests/TestCase.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,18 +171,12 @@ protected function createDatabase(): void
171171
{
172172
$command = $this->getDb()->createCommand();
173173

174+
$this->runMigrate('down', ['all']);
175+
174176
if ($this->getDb()->getTableSchema('migration', true) !== null) {
175177
$command->dropTable('migration')->execute();
176178
}
177179

178-
if ($this->getDb()->getTableSchema('tree', true) !== null) {
179-
$command->dropTable('tree')->execute();
180-
}
181-
182-
if ($this->getDb()->getTableSchema('multiple_tree', true) !== null) {
183-
$command->dropTable('multiple_tree')->execute();
184-
}
185-
186180
$this->runMigrate('up');
187181
}
188182

0 commit comments

Comments
 (0)