vd/database/migrations/2018_12_21_134548_create_tests_table.php
2018-12-21 16:09:08 +08:00

38 lines
787 B
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTestsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tests', function (Blueprint $table) {
$table->increments('id');
$table->string('sn', 32)->default('')->comment('编号');
$table->softDeletes();
$table->unique(['sn', 'deleted_at']);
$table->comment('测试');
$table->setIncrement(100);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('tests');
}
}