Mysql Schema::addField() incorectly processing indexes specification

Created on 13 January 2025, 6 days ago

Problem/Motivation

Faced in #3159210-59: Support route aliasing (Symfony 5.4) and allow deprecating the route name

The method implementation in mysql schema require to pass fields within spec for indexes but pgsql/sqlite require only keys definition in $keys_new

Steps to reproduce

    $spec = [
      'fields' => [
        'alias' => [
          'description' => 'The alias of the route, if applicable.',
          'type' => 'varchar_ascii',
          'length' => 255,
        ],
      ],
    ];
    $schema->addField('router', 'alias', $spec['fields']['alias']);
    $schema->addIndex('router', 'alias', ['alias'], $spec);

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

mysql db driver

Created by

🇫🇷France andypost

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024