Duplicate indexes when using `serial('').primaryKey()`

I have observed than whenever I use
serial('id').primaryKey()
in one of my tables, the primary key index gets duplicated.

mysql> SHOW INDEXES FROM tokens;
+--------+------------+--------------------------------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
| Table  | Non_unique | Key_name                             | Seq_in_index | Column_name   | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Visible | Expression |
+--------+------------+--------------------------------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
| tokens |          0 | PRIMARY                              |            1 | id            | A         |        1001 |     NULL |   NULL |      | BTREE      |         |               | YES     | NULL       |
| tokens |          0 | id                                   |            1 | id            | A         |        1001 |     NULL |   NULL |      | BTREE      |         |               | YES     | NULL       |


This does not happen for tables where the primary key is not a serial (I have one where the primary key is a varchar and there's no index duplication).

Is this expected for any reason? Am I doing something wrong?
image.png
Was this page helpful?