Skip to content

"goctl model mysql ddl" command generates code reports "missing primary key" #9

@aburizalpurnama

Description

@aburizalpurnama

I found an issue in go-zero where the error "missing primary key" occurs when trying to generate a model from mysql DDL.

After checking, the root cause seems to be in zeromicro/dll-parser, which only detects primary keys defined using table-level constraints. As a result, the "missing primary key" error appears when the primary key is defined using a column-level constraint.

It would be great to improve the code to also support primary keys defined at the column level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions