db: Add opd_cont_paper_print column to doctor_master table
This commit is contained in:
parent
385183fbe2
commit
e1968e4b1d
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
||||
class AddOpdContPaperPrintToDoctorMaster extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
if ($this->db->tableExists('doctor_master')) {
|
||||
$fields = [
|
||||
'opd_cont_paper_print' => [
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 100,
|
||||
'null' => true,
|
||||
'after' => 'opd_blank_print',
|
||||
],
|
||||
];
|
||||
|
||||
$this->forge->addColumn('doctor_master', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->tableExists('doctor_master') && $this->db->fieldExists('opd_cont_paper_print', 'doctor_master')) {
|
||||
$this->forge->dropColumn('doctor_master', 'opd_cont_paper_print');
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user