<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddPageColorToPdfTemplates extends Migration
{
    public function up()
    {
        $this->forge->addColumn('pdf_templates', [
            'page_color' => [
                'type'       => 'VARCHAR',
                'constraint' => 9,
                'default'    => '#ffffff',
                'after'      => 'page_count',
            ],
        ]);
    }

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