Viewing File: /home/markqprx/iniasli.pro/migrations/2023_05_09_124348_create_bans_table.php

<?php

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

return new class extends Migration
{

    public function up()
    {
      Schema::create('bans', function (Blueprint $table) {
        $table->increments('id');
        $table->morphs('bannable');
        $table->nullableMorphs('created_by');
        $table->text('comment')->nullable();
        $table->timestamp('expired_at')->nullable();
        $table->softDeletes();
        $table->timestamps();

        $table->index('expired_at');
      });
    }

    public function down()
    {
        Schema::dropIfExists('bans');
    }
};
Back to Directory File Manager