    <?php

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

    class AddFileDokumentasiToKegiatansTable extends Migration
    {
        /**
         * Run the migrations.
         *
         * @return void
         */
        public function up()
        {
            Schema::table('kegiatans', function (Blueprint $table) {
                // Tambahkan kolom baru file_dokumentasi (nullable)
                $table->string('file_dokumentasi')->nullable()->after('foto');
                
                // Opsional: rename kolom foto jika ingin konsisten
                // $table->renameColumn('foto', 'foto_lama');
            });
        }

        /**
         * Reverse the migrations.
         *
         * @return void
         */
        public function down()
        {
            Schema::table('kegiatans', function (Blueprint $table) {
                $table->dropColumn('file_dokumentasi');
                
                // Opsional: jika rename
                // $table->renameColumn('foto_lama', 'foto');
            });
        }
    }