You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$result['version'] = $this->getDbDriver()->getScalar('SELECT version FROM migration_version');
67
+
$result['version'] = $this->getDbDriver()->getScalar('SELECT version FROM ' . $this->getMigrationTable());
54
68
} catch (\Exception$ex) {
55
69
thrownewDatabaseNotVersionedException('This database does not have a migration version. Please use "migrate reset" or "migrate install" to create one.');
56
70
}
57
71
58
72
try {
59
-
$result['status'] = $this->getDbDriver()->getScalar('SELECT status FROM migration_version');
73
+
$result['status'] = $this->getDbDriver()->getScalar('SELECT status FROM ' . $this->getMigrationTable());
60
74
} catch (\Exception$ex) {
61
75
thrownewOldVersionSchemaException('This database does not have a migration version. Please use "migrate install" for update it.');
62
76
}
@@ -71,10 +85,10 @@ public function getVersion()
71
85
publicfunctionsetVersion($version, $status)
72
86
{
73
87
$this->getDbDriver()->execute(
74
-
'UPDATE migration_version SET version = :version, status = :status',
88
+
'UPDATE ' . $this->getMigrationTable() . ' SET version = :version, status = :status',
75
89
[
76
90
'version' => $version,
77
-
'status' => $status
91
+
'status' => $status,
78
92
]
79
93
);
80
94
}
@@ -88,7 +102,7 @@ protected function checkExistsVersion()
88
102
// Get the version to check if exists
89
103
$versionInfo = $this->getVersion();
90
104
if (empty($versionInfo['version'])) {
91
-
$this->getDbDriver()->execute("insert into migration_version values(0, 'unknow')");
105
+
$this->getDbDriver()->execute("insert into " . $this->getMigrationTable() . " values(0, 'unknow')");
92
106
}
93
107
}
94
108
@@ -97,8 +111,8 @@ protected function checkExistsVersion()
97
111
*/
98
112
publicfunctionupdateVersionTable()
99
113
{
100
-
$currentVersion = $this->getDbDriver()->getScalar('select version from migration_version');
0 commit comments