<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
		Schema::create('system_logs', function(Blueprint $table) {
			$table->id();
			$table->timestamps();

			$table->bigInteger('system_id');
			$table->foreign('system_id')->references('id')->on('systems');

			$table->integer('items_sent')->nullable();
			$table->integer('items_sent_size')->nullable();
			$table->integer('items_recv')->nullable();
			$table->integer('items_recv_size')->nullable();

			$table->integer('sessiontime');
			$table->integer('sessiontype');

			$table->integer('result');
		});
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('system_logs');
    }
};