<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddTanggalPublishToBerita extends Migration
{
    public function up()
    {
        $this->forge->addColumn('berita', [
            'tanggal_publish' => [
                'type' => 'DATE',
                'null' => true,
                'after' => 'is_published', // kalau is_published ada
            ],
        ]);
    }

    public function down()
    {
        $this->forge->dropColumn('berita', 'tanggal_publish');
    }
}
