mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-08 23:29:21 +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)) {
|
||||
$up();
|
||||
unset($up);
|
||||
}
|
||||
|
||||
updateDatabaseConfig('database_version', $i);
|
||||
@ -34,6 +35,7 @@ else { // register first version
|
||||
|
||||
if (isset($up)) {
|
||||
$up();
|
||||
unset($up);
|
||||
}
|
||||
|
||||
updateDatabaseConfig('database_version', $i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user