Merge pull request 'fix payslip view' (#45) from paulcortezl5 into main
Reviewed-on: #45pull/46/head
commit
0d77290d4e
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Forge;
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
||||
class ExtendUserAddEmpSysId extends Migration
|
||||
{
|
||||
private array $tables;
|
||||
|
||||
public function __construct(?Forge $forge = null)
|
||||
{
|
||||
parent::__construct($forge);
|
||||
|
||||
/** @var \Config\Auth $authConfig */
|
||||
$authConfig = config('Auth');
|
||||
$this->tables = $authConfig->tables;
|
||||
}
|
||||
|
||||
public function up()
|
||||
{
|
||||
$fields = [
|
||||
'sys_emp_id' => [
|
||||
'type' => 'INT',
|
||||
'constraint' => 11,
|
||||
'unsigned' => true,
|
||||
'after' => 'company_id',
|
||||
],
|
||||
];
|
||||
$this->forge->addColumn($this->tables['users'], $fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$fields = [
|
||||
'sys_emp_id',
|
||||
];
|
||||
$this->forge->dropColumn($this->tables['users'], $fields);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue