share-lt/database/migrations/2026_01_17_162204_add-url-to-entries.php

30 lines
769 B
PHP
Raw Normal View History

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('entries', function (Blueprint $table) {
$table->string('call_to_action_text')->nullable()->after('title');
$table->string('call_to_action_link')->nullable()->after('url');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('entries', function (Blueprint $table) {
$table->dropColumn('call_to_action_text');
$table->dropColumn('call_to_action_link');
});
}
};