3 use Illuminate\Database\Migrations\Migration;
4 use Illuminate\Database\Schema\Blueprint;
5 use Illuminate\Support\Facades\Schema;
7 return new class extends Migration
12 public function up(): void
14 Schema::table('activities', function (Blueprint $table) {
15 $table->renameColumn('entity_id', 'loggable_id');
16 $table->renameColumn('entity_type', 'loggable_type');
21 * Reverse the migrations.
23 public function down(): void
25 Schema::table('activities', function (Blueprint $table) {
26 $table->renameColumn('loggable_id', 'entity_id');
27 $table->renameColumn('loggable_type', 'entity_type');