You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
user_center/database/migrations/2021_02_02_071434_create_di...

38 lines
933 B

4 years ago
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDictionaryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('uc_dictionary_t', function (Blueprint $table) {
$table->id();
$table->bigInteger('pid')->default(0)->comment('父ID');
$table->string('name', 40)->comment('字典值');
$table->string('title', 40)->comment('字典名');
$table->tinyInteger('status')->default(1)->comment('状态:1 启用 2 关闭');
$table->timestamps();
$table->unique(['pid', 'name']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('uc_dictionary_t');
}
}