CodeIgniter Forums
How to create index using forge migration - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: How to create index using forge migration (/showthread.php?tid=76895)



How to create index using forge migration - MatheusCastro - 06-30-2020

I didn't find anything like that in the documentation.

I also didn't find any reference in the Forge.php file.

Would it be necessary to do a manual query?


RE: How to create index using forge migration - MGatner - 07-07-2020

You want `addKey`:

$this->forge->addKey('created_at');