EscolaLMS/Courses

View on GitHub
database/migrations/2022_02_18_083000_add_column_teaser_url.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

use EscolaLms\Courses\Enum\CourseStatusEnum;
use EscolaLms\Courses\Models\Course;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddColumnTeaserUrl extends Migration
{
    public function up(): void
    {
        Schema::table('courses', function (Blueprint $table) {
            $table->string('teaser_url')->nullable();
        });
    }

    public function down(): void
    {
        Schema::table('courses', function (Blueprint $table) {
            $table->dropColumn('teaser_url');
        });
    }
}