[eluser]Cambo[/eluser]
[quote author="jrtashjian" date="1289977561"]In CodeIgniter you can use:
Code:
$this->dbforge->add_key('field');
I'm not sure about the ExpressionEngine side of things, probably very similar. Maybe like:
Code:
$this->EE->dbforge->add_key('field');
[/quote]
Adding a Key is not the same as adding an Index. :-)
[quote author="InsiteFX" date="1289997210"]I do not think that you can do it with DBForge.
Use DBForge to create your database and build your fields and keys then create the table.
Then you can run this query to add your index to the table.
Code:
$sql = "CREATE INDEX your_index_name ON table_name(field_name)";
$this->db->query($sql);
InsiteFX[/quote]
This works fine for me. I just place it after the create table call.
Cambo