<?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('lotto_list', function (Blueprint $table) {
            $table->unsignedInteger('id', true)->primary();
            $table->string('server', 20)->nullable();
            $table->unsignedInteger('pid')->nullable();
            $table->dateTime('time')->nullable();

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

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