Skip to content

Commit 1b24830

Browse files
committed
fix: fix migrate schema command for v5
1 parent 630f390 commit 1b24830

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Command/MigrationV5Command.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,23 +95,23 @@ protected function configure(): void
9595
protected function initialize(InputInterface $input, OutputInterface $output): void
9696
{
9797
$this->accountName = $input->getOption('account');
98-
$this->step = $input->getOption('step');
98+
$this->step = (int) $input->getOption('step');
9999
$this->force = (true === $input->getOption('force'));
100100
$this->output = $output;
101101
}
102102

103103
protected function execute(InputInterface $input, OutputInterface $output)
104104
{
105105
if (!$this->force) {
106-
return $this->check();
106+
return (int) $this->check();
107107
}
108108

109109
$this->output->writeln('<info>***** MIGRATE SCHEMA *****</info>');
110110

111111
if (!$this->check()) {
112112
$this->output->writeln('<error>Check before migration failed</error>');
113113

114-
return false;
114+
return 1;
115115
}
116116

117117
if (1 === $this->step || 99 === $this->step) {
@@ -130,7 +130,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
130130
if (!$result) {
131131
$this->createTable();
132132

133-
return false;
133+
return 1;
134134
}
135135
}
136136

@@ -140,7 +140,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
140140
if (!$result) {
141141
$this->createTable();
142142

143-
return false;
143+
return 1;
144144
}
145145
}
146146

@@ -151,7 +151,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
151151

152152
$this->createTable();
153153

154-
return false;
154+
return 0;
155155
}
156156

157157
private function check(): bool
@@ -187,6 +187,7 @@ private function accountIsDefinedAndHaveJsonFile(): bool
187187
return false;
188188
}
189189

190+
$this->output->writeln('All checks passed successfully');
190191
return true;
191192
}
192193

0 commit comments

Comments
 (0)