[eluser]Unknown[/eluser]
HI
I find a problem,If background db is sql express 2008, the add_column will thread a error.
I don't sure that It's a bug.who can help me .thanks a lot.
Error Number: 42000
[Microsoft][SQL Server Native Client 10.0][SQL Server]column 'Array' must include datatype.
ALTER TABLE users ADD Array NOT NULL
Filename: C:\\website\\apache\\htdocs\\CodeIgniter_2\\system\\database\\DB_driver.php
Line Number: 330
controller as follows:
public function index()
{
$this->output->enable_profiler();
$this->load->database();
$this->load->dbforge();
$fields = array(
'user_id' => array(
'type' => 'INT'
),
'username' => array(
'type' => 'TEXT',
)
);
$this->dbforge->add_field($fields);
$this->dbforge->add_key('user_id', TRUE);
$this->dbforge->create_table('users');
$f = array(
'bio' => array('type' => 'TEXT')
);
$this->dbforge->add_column('users', $f);
$this->dbforge->drop_column('users', 'bio');
$f = array(
'status' => array('type' => 'BOOLEAN')
);
$this->dbforge->add_column('users', $f);
}