You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
892 B
PHP
38 lines
892 B
PHP
<?php
|
|
|
|
namespace App\Database\Migrations;
|
|
|
|
use CodeIgniter\Database\Migration;
|
|
|
|
class AddTaxNonTaxDeductionOnEmpPayTrans extends Migration
|
|
{
|
|
public function up()
|
|
{
|
|
$fields = [
|
|
'taxable_deduction' => [
|
|
'type' => 'DECIMAL',
|
|
'constraint' => '12,4',
|
|
'null' => false,
|
|
'after' => 'total_deduction',
|
|
],
|
|
'nontaxable_deduction' => [
|
|
'type' => 'DECIMAL',
|
|
'constraint' => '12,4',
|
|
'null' => false,
|
|
'after' => 'taxable_deduction',
|
|
],
|
|
];
|
|
$this->forge->addColumn('emp_pay_trans', $fields);
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$fields = [
|
|
'taxable_deduction',
|
|
'nontaxable_deduction',
|
|
];
|
|
|
|
$this->forge->dropColumn('emp_pay_trans', $fields);
|
|
}
|
|
}
|