<?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('speed_hack', function (Blueprint $table) {
            $table->unsignedInteger('pid');
            $table->dateTime('time')->useCurrent();
            $table->integer('x');
            $table->integer('y');
            $table->string('hack_count', 20)->nullable();

            $table->foreign('pid')->references('id')->on('player');
        });
    }

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