public function testUpdatesIndexLength()
{
$this->connection->exec('CREATE TABLE index_length (path text NULL)');
$this->connection->exec('CREATE INDEX path ON index_length (path(333))');
$table = new Table('index_length');
$table->addColumn('path', 'text', ['notnull' => false]);
$table->addIndex(['path'], 'path', [], ['lengths' => [768]]);
$fromSchema = $this->connection->getSchemaManager()->createSchema();
$toSchema = new Schema([$table]);
$diff = $fromSchema->getMigrateToSql($toSchema, $this->connection->getDatabasePlatform());
self::assertContains('ALTER TABLE index_length DROP INDEX path, ADD INDEX path (path(768))', $diff);
}
Originally reported by @leofeyer in #3409 (comment).