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.
37 lines
933 B
37 lines
933 B
<?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');
|
|
}
|
|
}
|
|
|