CodeIgniter Forums

Full Version: add_column not working in codeigniter 3.1.3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All, 

Iam trying to add a new column using the following code, but it is not working. Thanks in advance...

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Migration_Add_age_patient extends CI_Migration {

  public function up(){
  $this->dbforge->add_column('patientmedicalprofile', array(
                'age' => array(
                    'type' => 'INT',
                    'constraint' => 11,
                    'default' => '',
                    'after' => 'birthday',
                    'null' => TRUE,
                )
            ));
 

  }

  public function down(){

  }
}