Файл: database/migrations/2018_04_20_180003_create_banhist_table.php
Строк: 39
<?php
use AppModelsBanhist;
use IlluminateDatabaseMigrationsMigration;
use IlluminateDatabaseSchemaBlueprint;
use IlluminateSupportFacadesSchema;
return new class extends Migration {
public function up(): void
{
if (! Schema::hasTable('banhist')) {
Schema::create('banhist', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id');
$table->integer('send_user_id');
$table->enum('type', [Banhist::BAN, Banhist::UNBAN, Banhist::CHANGE]);
$table->text('reason');
$table->integer('term')->default(0);
$table->dateTime('created_at')->nullable();
$table->boolean('explain')->default(false);
$table->index('user_id');
$table->index('created_at');
});
}
}
public function down(): void
{
Schema::dropIfExists('banhist');
}
};