mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
change panel table id to int
This commit is contained in:
@@ -17,7 +17,7 @@ class CreateAdminpanelTable extends Migration
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Schema::create('adminpanel', function (Blueprint $table) {
|
Schema::create('adminpanel', function (Blueprint $table) {
|
||||||
$table->tinyIncrements('id');
|
$table->id();
|
||||||
$table->string('name', 128)->default('');
|
$table->string('name', 128)->default('');
|
||||||
$table->string('url')->default('');
|
$table->string('url')->default('');
|
||||||
$table->string('info')->default('');
|
$table->string('info')->default('');
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class CreateModpanelTable extends Migration
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Schema::create('modpanel', function (Blueprint $table) {
|
Schema::create('modpanel', function (Blueprint $table) {
|
||||||
$table->tinyIncrements('id');
|
$table->id();
|
||||||
$table->string('name', 128)->default('');
|
$table->string('name', 128)->default('');
|
||||||
$table->string('url')->default('');
|
$table->string('url')->default('');
|
||||||
$table->string('info')->default('');
|
$table->string('info')->default('');
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class CreateSysoppanelTable extends Migration
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Schema::create('sysoppanel', function (Blueprint $table) {
|
Schema::create('sysoppanel', function (Blueprint $table) {
|
||||||
$table->tinyIncrements('id');
|
$table->id();
|
||||||
$table->string('name', 128)->default('');
|
$table->string('name', 128)->default('');
|
||||||
$table->string('url')->default('');
|
$table->string('url')->default('');
|
||||||
$table->string('info')->default('');
|
$table->string('info')->default('');
|
||||||
|
|||||||
@@ -85,6 +85,16 @@ class Update extends Install
|
|||||||
|
|
||||||
public function runExtraQueries()
|
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
|
//custom field menu
|
||||||
$url = 'fields.php';
|
$url = 'fields.php';
|
||||||
$table = 'adminpanel';
|
$table = 'adminpanel';
|
||||||
@@ -225,6 +235,8 @@ class Update extends Install
|
|||||||
$this->removeMenu('sysoppanel', $menuToDel);
|
$this->removeMenu('sysoppanel', $menuToDel);
|
||||||
$this->removeMenu('adminpanel', $menuToDel);
|
$this->removeMenu('adminpanel', $menuToDel);
|
||||||
$this->removeMenu('modpanel', $menuToDel);
|
$this->removeMenu('modpanel', $menuToDel);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function runExtraMigrate()
|
public function runExtraMigrate()
|
||||||
|
|||||||
Reference in New Issue
Block a user