mirror of
https://github.com/slawkens/myaac.git
synced 2025-11-02 17:06:24 +01:00
Unset $up after migration, to prevent executing same migration twice
This commit is contained in:
@@ -20,6 +20,7 @@ if(fetchDatabaseConfig('database_version', $tmp)) { // we got version
|
|||||||
|
|
||||||
if (isset($up)) {
|
if (isset($up)) {
|
||||||
$up();
|
$up();
|
||||||
|
unset($up);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateDatabaseConfig('database_version', $i);
|
updateDatabaseConfig('database_version', $i);
|
||||||
@@ -34,6 +35,7 @@ else { // register first version
|
|||||||
|
|
||||||
if (isset($up)) {
|
if (isset($up)) {
|
||||||
$up();
|
$up();
|
||||||
|
unset($up);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateDatabaseConfig('database_version', $i);
|
updateDatabaseConfig('database_version', $i);
|
||||||
|
|||||||
Reference in New Issue
Block a user