<?php
 use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateReportCountHourly extends Migration { public function up() { Schema::create('report_count_hourly', function (Blueprint $table) { $table->increments('id'); $table->timestamps(); $table->string('tableName', 100)->nullable()->comment('表'); $table->string('tableWhere', 200)->nullable()->comment('条件'); $table->dateTime('daytime')->nullable()->comment('日期'); $table->integer('cnt')->nullable()->comment('数量'); $table->unique(['tableName', 'tableWhere', 'daytime']); }); } public function down() { } } 