<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddScheduleToRewards extends Migration
{
    public function up()
    {
        $this->forge->addColumn('rewards', [
            'start_date' => ['type' => 'DATE', 'null' => true, 'after' => 'points_required'],
            'end_date' => ['type' => 'DATE', 'null' => true, 'after' => 'start_date'],
        ]);
    }

    public function down()
    {
        $this->forge->dropColumn('rewards', ['start_date', 'end_date']);
    }
}
