Вход Регистрация
Файл: database/migrations/2018_04_20_180030_create_notices_table.php
Строк: 32
<?php

use IlluminateDatabaseMigrationsMigration;
use 
IlluminateDatabaseSchemaBlueprint;
use 
IlluminateSupportFacadesSchema;

return new class extends 
Migration {
    public function 
up(): void
    
{
        if (! 
Schema::hasTable('notices')) {
            
Schema::create('notices', function (Blueprint $table) {
                
$table->increments('id');
                
$table->string('type'20);
                
$table->string('name'100);
                
$table->text('text');
                
$table->integer('user_id');
                
$table->boolean('protect')->default(false);
                
$table->dateTime('updated_at')->nullable();
                
$table->dateTime('created_at')->nullable();

                
$table->unique('type');
            });
        }
    }

    public function 
down(): void
    
{
        
Schema::dropIfExists('notices');
    }
};
Онлайн: 2
Реклама