[eluser]nuclearmaker[/eluser]
how to add primary key in migration? i want to set blog_id as PRIMARY KEY
Code:
public function up()
{
$this->dbforge->add_field(array(
'blog_id' => array(
'type' => 'INT',
'auto_increment' => TRUE
),
'blog_title' => array(
'type' => 'VARCHAR',
'constraint' => '100',
),
'blog_description' => array(
'type' => 'TEXT',
'null' => TRUE,
),
));
$this->dbforge->create_table('blog');
}