mirror of
https://github.com/slawkens/myaac.git
synced 2025-11-03 09:26:22 +01:00
Fix migrations upgrade and downgrade
+ Add option to disable auto migrate
This commit is contained in:
@@ -45,7 +45,7 @@ $up = function () use ($db) {
|
||||
}
|
||||
|
||||
if(!$db->hasColumn(TABLE_PREFIX . 'monsters', 'rewardboss')) {
|
||||
$db->addColumn(TABLE_PREFIX . 'monsters', 'rewardboss', "TINYINT(1) TINYINT(1) NOT NULL DEFAULT '0' AFTER `attackable`");
|
||||
$db->addColumn(TABLE_PREFIX . 'monsters', 'rewardboss', "TINYINT(1) NOT NULL DEFAULT '0' AFTER `attackable`");
|
||||
}
|
||||
|
||||
if(!$db->hasColumn(TABLE_PREFIX . 'monsters', 'defense')) {
|
||||
|
||||
@@ -13,6 +13,6 @@ $up = function () use ($db) {
|
||||
|
||||
$down = function () use ($db) {
|
||||
if ($db->hasColumn(TABLE_PREFIX . 'visitors', 'user_agent')) {
|
||||
$db->dropColumn(TABLE_PREFIX . 'monsters', 'user_agent');
|
||||
$db->dropColumn(TABLE_PREFIX . 'visitors', 'user_agent');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,7 +11,8 @@ $up = function () use ($db) {
|
||||
};
|
||||
|
||||
$down = function () use ($db) {
|
||||
if ($db->hasTable(TABLE_PREFIX . 'settings')) {
|
||||
$db->dropTable(TABLE_PREFIX . 'settings');
|
||||
}
|
||||
// will break the aac
|
||||
//if ($db->hasTable(TABLE_PREFIX . 'settings')) {
|
||||
// $db->dropTable(TABLE_PREFIX . 'settings');
|
||||
//}
|
||||
};
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @var OTS_DB_MySQL $db
|
||||
*/
|
||||
|
||||
// 2023-11-11
|
||||
// execute highscores_ids_hidden once again, cause of settings
|
||||
$up = function () {
|
||||
$up = function () use ($db) {
|
||||
require __DIR__ . '/20.php';
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user