<?php

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

return new class extends Migration
{
    public function up()
    {
        Schema::table('informasi', function (Blueprint $table) {

            $table->renameColumn('kategori', 'kategori_informasi');
            $table->renameColumn('judul', 'judul_informasi');
            $table->renameColumn('isi', 'isi_informasi');
            $table->renameColumn('tanggal', 'tanggal_informasi');
            $table->renameColumn('gambar', 'gambar_informasi');
        });
    }

    public function down()
    {
        Schema::table('informasi', function (Blueprint $table) {

            $table->renameColumn('kategori_informasi', 'kategori');
            $table->renameColumn('judul_informasi', 'judul');
            $table->renameColumn('isi_informasi', 'isi');
            $table->renameColumn('tanggal_informasi', 'tanggal');
            $table->renameColumn('gambar_informasi', 'gambar');
        });
    }
};
