123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Support\Facades\DB;
- class CreateCallLogsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('call_logs', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->integer('order_id')->comment("订单表ID");
- $table->integer('dial_time')->comment("拨打时间");
- $table->integer('dialend_time')->comment("结束时间");
- $table->integer('talk_time')->comment("通话时长");
- $table->timestamps();
- });
- DB::statement("ALTER TABLE `bm_call_logs` comment '通话记录表'");
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('call_logs');
- }
- }
|