<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class Migration_taxgroupconstraint extends Migration
{
	public function up(): void
	{
		$this->db->query('ALTER TABLE ' . $this->db->prefixTable('tax_jurisdictions') . ' ADD CONSTRAINT tax_jurisdictions_uq1 UNIQUE (tax_group)');
	}

	public function down(): void
	{
		$this->db->query('ALTER TABLE ' . $this->db->prefixTable('tax_jurisdictions') . ' DROP INDEX tax_jurisdictions_uq1');
	}
}