<?php

namespace {{migrations_namespace}};

use Framework\Contracts\Migration;
use Framework\Database\Schema\Structure;
use Framework\Supports\Facades\Schema;

use function Framework\app;

class {{class_name}} implements Migration
{
    public function up()
    {
        Schema::create('{{table}}', function (Structure $table) {
            $table->id();
            $table->string('uuid', 36);
            $table->string('queue', 191);
            $table->long_text('payload');
            $table->long_text('exception');
            $table->unsigned_integer('failed_at');

            $table->unique('uuid', app()->prefix() . 'failed_jobs_uuid_unique');
        });
    }

    public function down()
    {
        Schema::drop_if_exists('{{table}}');
    }
}
