2020_10_16_085317_create_call_logs_table.php 982 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. use Illuminate\Support\Facades\DB;
  6. class CreateCallLogsTable extends Migration
  7. {
  8. /**
  9. * Run the migrations.
  10. *
  11. * @return void
  12. */
  13. public function up()
  14. {
  15. Schema::create('call_logs', function (Blueprint $table) {
  16. $table->bigIncrements('id');
  17. $table->integer('order_id')->comment("订单表ID");
  18. $table->integer('dial_time')->comment("拨打时间");
  19. $table->integer('dialend_time')->comment("结束时间");
  20. $table->integer('talk_time')->comment("通话时长");
  21. $table->timestamps();
  22. });
  23. DB::statement("ALTER TABLE `bm_call_logs` comment '通话记录表'");
  24. }
  25. /**
  26. * Reverse the migrations.
  27. *
  28. * @return void
  29. */
  30. public function down()
  31. {
  32. Schema::dropIfExists('call_logs');
  33. }
  34. }