<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddPlusCodeToLocations extends Migration
{
    public function up(): void
    {
        $this->forge->addColumn('locations', [
            'plus_code' => [
                'type'       => 'VARCHAR',
                'constraint' => 64,
                'null'       => true,
                'after'      => 'address_name',
            ],
        ]);
    }

    public function down(): void
    {
        $this->forge->dropColumn('locations', 'plus_code');
    }
}
