Skip to content

[BUG] Unnecessary Unique Index on Primary key is auto-selected in MYSQL & MariaDB #961

@netlukewebs

Description

@netlukewebs

Describe the bug
When creating a New Table in MySQL or MariaDB database, In the primary key (id) column, the UNIQUE checkbox is automatically getting selected. Because of this when exporting SQL code the UNIQUE keyword is present on the primary key column. So while running the SQL code in MySQL, Two index is getting created for the primary key column. Primary key already has an index, and then because UNIQUE is auto-selected and exported in the SQL code on the primary key, another UNIQUE index is getting created in the DATABASE. Which is wrong and effects performance. Please remove auto-selected UNIQUE checkbox function from the primary key (id) column.

To Reproduce
Steps to reproduce the behavior:

  1. Create a New table in the UI
  2. Click on Edit table icon
  3. Click on the three dots in of the Primary Key (id)
  4. See Qnique Checkbox is auto-selected by default. Which is creating the duplicate index problem.

Expected behavior
Qnique Checkbox should not be auto-selected by default for the Primary Key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions