Files
lsky-pro/database/migrations/2014_10_10_000000_create_groups_table.php
T
2021-12-11 20:06:04 +08:00

39 lines
923 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGroupsTable 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->json('configs')->comment('组配置');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('groups');
}
}