We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b8dc40 commit d6523aaCopy full SHA for d6523aa
src/Commands/AbstractCommand.php
@@ -31,7 +31,11 @@ public function getDbDriver()
31
32
public function getVersion()
33
{
34
- return $this->getDbDriver()->getScalar('SELECT version FROM migration_version');
+ try {
35
+ return $this->getDbDriver()->getScalar('SELECT version FROM migration_version');
36
+ } catch (\Exception $ex) {
37
+ throw new \Exception('This database does not have a migration version. Please use "migrate reset" to create one.');
38
+ }
39
}
40
41
public function setVersion($version)
0 commit comments