1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateHistoriesTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('histories', function (Blueprint $table) {
- $table->id();
- $table->bigInteger('to_province')->default(0)->comment('省份');
- $table->bigInteger('to_city')->default(0)->comment('市');
- $table->bigInteger('to_area')->default(0)->comment('县/区');
- $table->bigInteger('to_street')->default(0)->comment('乡级');
- $table->bigInteger('from_province')->default(0)->comment('省份');
- $table->bigInteger('from_city')->default(0)->comment('市');
- $table->bigInteger('from_area')->default(0)->comment('县/区');
- $table->bigInteger('from_street')->default(0)->comment('乡级');
- $table->string('to_name', 300)->nullable()->comment('目的地');
- $table->string('from_name', 300)->nullable()->comment('出发地');
- $table->bigInteger('user_id')->default(0);
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('histories');
- }
- }
|