34 lines
744 B
PHP
34 lines
744 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateConfigsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('configs', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->string('ename',50)->comment('调用英文名');
|
|
$table->text('content')->nullable()->comment('值');
|
|
$table->unique(['ename']);//唯一索引
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('configs');
|
|
}
|
|
}
|