<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class ExtendSignaturesForDeliveryNotes extends Migration
{
    public function up()
    {
        $this->forge->modifyColumn('signatures', [
            'signable_type' => ['name' => 'signable_type', 'type' => 'VARCHAR', 'constraint' => 40],
            'role' => ['name' => 'role', 'type' => 'VARCHAR', 'constraint' => 80],
        ]);
    }

    public function down()
    {
        $this->forge->modifyColumn('signatures', [
            'signable_type' => ['name' => 'signable_type', 'type' => "ENUM('inspection','report')"],
            'role' => ['name' => 'role', 'type' => "ENUM('inspector','cliente')"],
        ]);
    }
}
