View file database/upgrades/2022_01_10_235416_add_links_to_downs.php

File size: 695B
<?php

declare(strict_types=1);

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

final class AddLinksToDowns extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up(): void
    {
        Schema::table('downs', function (Blueprint $table) {
            $table->json('links')->nullable()->after('active');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down(): void
    {
        Schema::table('downs', function (Blueprint $table) {
            $table->dropColumn('links');
        });
    }
}