Skip to content

Type clash between enums from different tables #4162

@olivierboucher

Description

@olivierboucher

Version

1.30.0

What happened?

Given the following tables:

create table everflow_admin.customer_contract (
...
`status` enum('active', 'done', 'early_terminated', 'deleted', 'pending') not null,
...
)
create table everflow_admin.customer (
...
`contract_type` enum('customer', 'trial', 'pilot') not null default 'customer',
...
)

Generation will fail with message:

 type "customer_contract_type" already exists

Is there a way to override the naming for this enum some way or an other?

Relevant log output

type "customer_contract_type" already exists

Database schema

SQL queries

Configuration

Playground URL

No response

What operating system are you using?

macOS

What database engines are you using?

MySQL

What type of code are you generating?

Go

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions