Skip to content

Commit d79f5bb

Browse files
thisismeonmounteverestthisismeonmounteverest
authored andcommitted
Fix broken test:database:create. (Copy/paste error.)
1 parent 384c62c commit d79f5bb

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/Command/CreateTestDatabase.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7373
'',
7474
]);
7575

76-
$process = new Process([$phpBinaryPath, 'bin/console', 'doctrine:database:create', '--if-not-exists', '--no-interaction']);
76+
$process = new Process([$phpBinaryPath, 'bin/console', 'doctrine:database:drop', '--force', '--no-interaction']);
7777
$process->run();
78+
if (!$process->isSuccessful()) {
79+
$output->writeln([
80+
'Dropping the database failed (continuing anyway).',
81+
'',
82+
]);
83+
}
7884
}
7985

8086
$output->writeln([
@@ -100,6 +106,15 @@ protected function execute(InputInterface $input, OutputInterface $output): int
100106
'',
101107
]);
102108

109+
$process = new Process([$phpBinaryPath, 'bin/console', 'doctrine:schema:create', '--dump-sql', '--no-interaction']);
110+
$process->run();
111+
$output->writeln([
112+
'Creating the schema (see output below for SQL).',
113+
'',
114+
$process->getOutput(),
115+
$process->getErrorOutput(),
116+
]);
117+
103118
$process = new Process([$phpBinaryPath, 'bin/console', 'doctrine:schema:create', '--no-interaction']);
104119
$process->run();
105120

0 commit comments

Comments
 (0)