Specifies the index type.
await db.schema
.createTable('person')
.addColumn('email', 'varchar(255)')
.addIndex('email_index', ['email'], (ib) => ib.using('hash'))
.execute()
The generated SQL (MySQL):
create table `person` (`email` varchar(255), index `email_index` (`email`) using hash)
Specifies the index type.
await db.schema
.createTable('person')
.addColumn('email', 'varchar(255)')
.addIndex('email_index', ['email'], (ib) => ib.using('hash'))
.execute()
The generated SQL (MySQL):
create table `person` (`email` varchar(255), index `email_index` (`email`) using hash)
Simply calls the provided function passing
thisas the only argument.$callreturns what the provided function returns.