|
@@ -15,7 +15,7 @@ class CreateAdminTables extends Migration
|
|
|
$connection = config('admin.database.connection') ?: config('database.default');
|
|
|
|
|
|
Schema::connection($connection)->create(config('admin.database.users_table'), function (Blueprint $table) {
|
|
|
- $table->increments('id');
|
|
|
+ $table->bigIncrements('id');
|
|
|
$table->string('username', 190)->unique();
|
|
|
$table->string('password', 60);
|
|
|
$table->string('name');
|
|
@@ -25,26 +25,26 @@ class CreateAdminTables extends Migration
|
|
|
});
|
|
|
|
|
|
Schema::connection($connection)->create(config('admin.database.roles_table'), function (Blueprint $table) {
|
|
|
- $table->increments('id');
|
|
|
+ $table->bigIncrements('id');
|
|
|
$table->string('name', 50);
|
|
|
$table->string('slug', 50)->unique();
|
|
|
$table->timestamps();
|
|
|
});
|
|
|
|
|
|
Schema::connection($connection)->create(config('admin.database.permissions_table'), function (Blueprint $table) {
|
|
|
- $table->increments('id');
|
|
|
+ $table->bigIncrements('id');
|
|
|
$table->string('name', 50);
|
|
|
$table->string('slug', 50)->unique();
|
|
|
$table->string('http_method')->nullable();
|
|
|
$table->text('http_path')->nullable();
|
|
|
$table->integer('order')->default(0);
|
|
|
- $table->integer('parent_id')->default(0);
|
|
|
+ $table->bigInteger('parent_id')->default(0);
|
|
|
$table->timestamps();
|
|
|
});
|
|
|
|
|
|
Schema::connection($connection)->create(config('admin.database.menu_table'), function (Blueprint $table) {
|
|
|
- $table->increments('id');
|
|
|
- $table->integer('parent_id')->default(0);
|
|
|
+ $table->bigIncrements('id');
|
|
|
+ $table->bigInteger('parent_id')->default(0);
|
|
|
$table->integer('order')->default(0);
|
|
|
$table->string('title', 50);
|
|
|
$table->string('icon', 50)->nullable();
|
|
@@ -54,36 +54,36 @@ class CreateAdminTables extends Migration
|
|
|
});
|
|
|
|
|
|
Schema::connection($connection)->create(config('admin.database.role_users_table'), function (Blueprint $table) {
|
|
|
- $table->integer('role_id');
|
|
|
- $table->integer('user_id');
|
|
|
+ $table->bigInteger('role_id');
|
|
|
+ $table->bigInteger('user_id');
|
|
|
$table->unique(['role_id', 'user_id']);
|
|
|
$table->timestamps();
|
|
|
});
|
|
|
|
|
|
Schema::connection($connection)->create(config('admin.database.role_permissions_table'), function (Blueprint $table) {
|
|
|
- $table->integer('role_id');
|
|
|
- $table->integer('permission_id');
|
|
|
+ $table->bigInteger('role_id');
|
|
|
+ $table->bigInteger('permission_id');
|
|
|
$table->unique(['role_id', 'permission_id']);
|
|
|
$table->timestamps();
|
|
|
});
|
|
|
|
|
|
Schema::connection($connection)->create(config('admin.database.role_menu_table'), function (Blueprint $table) {
|
|
|
- $table->integer('role_id');
|
|
|
- $table->integer('menu_id');
|
|
|
+ $table->bigInteger('role_id');
|
|
|
+ $table->bigInteger('menu_id');
|
|
|
$table->unique(['role_id', 'menu_id']);
|
|
|
$table->timestamps();
|
|
|
});
|
|
|
|
|
|
Schema::connection($connection)->create(config('admin.database.permission_menu_table'), function (Blueprint $table) {
|
|
|
- $table->integer('permission_id');
|
|
|
- $table->integer('menu_id');
|
|
|
+ $table->bigInteger('permission_id');
|
|
|
+ $table->bigInteger('menu_id');
|
|
|
$table->unique(['permission_id', 'menu_id']);
|
|
|
$table->timestamps();
|
|
|
});
|
|
|
|
|
|
Schema::connection($connection)->create(config('admin.database.operation_log_table'), function (Blueprint $table) {
|
|
|
- $table->increments('id');
|
|
|
- $table->integer('user_id');
|
|
|
+ $table->bigIncrements('id');
|
|
|
+ $table->bigInteger('user_id');
|
|
|
$table->string('path');
|
|
|
$table->string('method', 10);
|
|
|
$table->string('ip');
|