1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateEmailsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('emails', function (Blueprint $table) {
- $table->increments('id');
- $table->string('name')->unique()->comment('名称');
- $table->string('alias')->unique()->comment('别名');
- $table->tinyInteger('status')->index()->comment('状态(1:开启 0: 关闭)');
- $table->timestamps();
- $table->softDeletes();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('emails');
- }
- }
|