getTable('users'); $table->addColumn('uid_lower', 'string', [ 'notnull' => false, 'length' => 64, 'default' => '', ]); $table->addIndex(['uid_lower'], 'user_uid_lower'); return $schema; } /** * @param IOutput $output * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param array $options */ public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { $qb = $this->connection->getQueryBuilder(); $qb->update('users') ->set('uid_lower', $qb->func()->lower('uid')); $qb->execute(); } }