db->disableForeignKeyChecks(); $this->forge->modifyColumn('opd_master', [ 'apointment_date' => [ 'type' => 'DATETIME', 'null' => true, 'default' => null, 'comment' => 'Appointment date and time' ] ]); $this->db->enableForeignKeyChecks(); } public function down() { // Revert the column back to DATE type $this->db->disableForeignKeyChecks(); $this->forge->modifyColumn('opd_master', [ 'apointment_date' => [ 'type' => 'DATE', 'null' => true, 'default' => null, 'comment' => 'Appointment date' ] ]); $this->db->enableForeignKeyChecks(); } }