[eluser]spyro[/eluser]
I have three questions.
1. The first is which do you recommend to use in an installer, to build tables with DBForge or use a schema dump? Schema dump seems easier unless you can add to the reasoning that it is not.
2. If are using a schema dump from phpmyadmin then how do you import without errors?
I read the file into a string, did the escape sequence, and ran the query and got errors on a dump that I know will import from the CLI.
3. Using dbforge I keep getting this error:
A PHP Error was encountered
Severity: Notice
Message: Array to string conversion
Filename: database/DB_driver.php
Line Number: 1206
Not sure where it is trying to convert using the code below:
Code:
$this->load->dbforge();
$fields = array(
'id' => array(
'type' => 'INT',
'constraint' => 10,
'auto_increment' => TRUE
),
'instance_1' => array(
'type' => 'INT',
'constraint' => '10',
),
'snapshot_1' => array(
'type' =>'INT',
'constraint' => '10',
),
'instance_2' => array(
'type' => 'INT',
'contraint' => '10',
),
'snapshot_2' => array(
'type' => 'INT',
'contraint' => '10',
),
);
$this->dbforge->add_field($fields);
$this->dbforge->add_key('id', TRUE);
$this->dbforge->create_table('comparisons');