Files
lsky-pro/database/migrations/2014_10_10_000000_create_groups_table.php
T
2022-03-01 11:39:51 +08:00

40 lines
1005 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('groups', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->charset = 'utf8mb4';
$table->collation = 'utf8mb4_unicode_ci';
$table->id();
$table->string('name', 64)->comment('角色组名称');
$table->boolean('is_default')->default(false)->comment('是否默认');
$table->boolean('is_guest')->default(false)->comment('是否为游客组');
$table->json('configs')->comment('组配置');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('groups');
}
};