db: Add opd_cont_paper_print column to doctor_master table

This commit is contained in:
DevSoftTech Server 2026-04-10 13:28:03 +05:30
parent 385183fbe2
commit e1968e4b1d

View File

@ -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');
}
}
}