<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddLetterSettingsToSchoolSettings extends Migration
{
    public function up()
    {
        $this->forge->addColumn('school_settings', [
            'letter_kemenag_office' => [
                'type'       => 'VARCHAR',
                'constraint' => 200,
                'null'       => true,
                'after'      => 'logo_sekolah',
            ],
            'letter_school_code' => [
                'type'       => 'VARCHAR',
                'constraint' => 50,
                'null'       => true,
                'after'      => 'letter_kemenag_office',
            ],
            'letter_city' => [
                'type'       => 'VARCHAR',
                'constraint' => 100,
                'null'       => true,
                'after'      => 'letter_school_code',
            ],
        ]);
    }

    public function down()
    {
        $this->forge->dropColumn('school_settings', ['letter_kemenag_office', 'letter_school_code', 'letter_city']);
    }
}
