12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateWorkersTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('workers', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->string('job_number', 20)->comment('工号');
- $table->string('account', 20)->comment('账号');
- $table->string('name', 20)->comment('姓名');
- $table->char('phone', 12)->comment('手机号');
- $table->bigInteger('area_id')->default(0)->comment('区域id');
- $table->bigInteger('admin_id')->default(0)->comment('管理员');
- $table->tinyInteger('status')->default(1);
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('workers');
- }
- }
|