123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateLogsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('logs', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('tid')->default(0)->comment('traceId');
- $table->integer('gid')->default(0)->comment('物品id');
- $table->string('ip')->nullable()->comment('ip地址');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('logs');
- }
- }
|