diff --git a/database/migrations/2021_06_08_113437_create_adminpanel_table.php b/database/migrations/2021_06_08_113437_create_adminpanel_table.php index 7c236328..56896b91 100644 --- a/database/migrations/2021_06_08_113437_create_adminpanel_table.php +++ b/database/migrations/2021_06_08_113437_create_adminpanel_table.php @@ -17,7 +17,7 @@ class CreateAdminpanelTable extends Migration return; } Schema::create('adminpanel', function (Blueprint $table) { - $table->tinyIncrements('id'); + $table->id(); $table->string('name', 128)->default(''); $table->string('url')->default(''); $table->string('info')->default(''); diff --git a/database/migrations/2021_06_08_113437_create_modpanel_table.php b/database/migrations/2021_06_08_113437_create_modpanel_table.php index 1e133dc5..d181ec06 100644 --- a/database/migrations/2021_06_08_113437_create_modpanel_table.php +++ b/database/migrations/2021_06_08_113437_create_modpanel_table.php @@ -17,7 +17,7 @@ class CreateModpanelTable extends Migration return; } Schema::create('modpanel', function (Blueprint $table) { - $table->tinyIncrements('id'); + $table->id(); $table->string('name', 128)->default(''); $table->string('url')->default(''); $table->string('info')->default(''); diff --git a/database/migrations/2021_06_08_113437_create_sysoppanel_table.php b/database/migrations/2021_06_08_113437_create_sysoppanel_table.php index 80abdf7f..c1520f8a 100644 --- a/database/migrations/2021_06_08_113437_create_sysoppanel_table.php +++ b/database/migrations/2021_06_08_113437_create_sysoppanel_table.php @@ -17,7 +17,7 @@ class CreateSysoppanelTable extends Migration return; } Schema::create('sysoppanel', function (Blueprint $table) { - $table->tinyIncrements('id'); + $table->id(); $table->string('name', 128)->default(''); $table->string('url')->default(''); $table->string('info')->default(''); diff --git a/nexus/Install/Update.php b/nexus/Install/Update.php index 454ef5c1..3641130d 100644 --- a/nexus/Install/Update.php +++ b/nexus/Install/Update.php @@ -85,6 +85,16 @@ class Update extends Install public function runExtraQueries() { + /** + * @since 1.7.13 + */ + foreach (['adminpanel', 'modpanel', 'sysoppanel'] as $table) { + $columnInfo = NexusDB::getMysqlColumnInfo($table, 'id'); + if ($columnInfo['DATA_TYPE'] == 'tinyint') { + sql_query("alter table $table modify id int(11) unsigned not null AUTO_INCREMENT"); + } + } + //custom field menu $url = 'fields.php'; $table = 'adminpanel'; @@ -225,6 +235,8 @@ class Update extends Install $this->removeMenu('sysoppanel', $menuToDel); $this->removeMenu('adminpanel', $menuToDel); $this->removeMenu('modpanel', $menuToDel); + + } public function runExtraMigrate()