I have an entity named 'account' which will have a username column and I want to index by this because I will be using it to lookup the username when logging in.
How do I tell redbean orm that I would like this table to have column 'username' to be indexed for faster lookup? Would I have to update the database manually instead of going through redbean orm?
I think this is what you're after:
R::$writer->addIndex('account','userindex','username');