mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-09 23:49:20 +02:00
Unset $up after migration, to prevent executing same migration twice
This commit is contained in:
parent
cc8b0dba7f
commit
a4eb798a85
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user