Skip to content

column name field does not work #7207

Closed as not planned
Closed as not planned

Description

@ORESoftware

I am on:

"typeorm": "^0.2.29",

Issue Description

this code:

  @Column({nullable: false, name: 'content_type'})
  contentType: string;  

from a blank database it creates a table with two columns:

contentType and content_type :(

Expected Behavior

Expect just one column: content_type

Actual Behavior

I get 2 columns :(
This is happening for other columns, not just this one, so nothing to do with column name..

Activity

  1. luxaritas commented on Jan 27, 2021

    @luxaritas

    I see this when using sync without having done a migration - though without any duplicate columns (it just uses the autogenerated names)

  2. Hiroki111 commented on Sep 19, 2021

    @Hiroki111

    This may not be 100% relevant, but I saw the same error for @OneToMany. After using @JoinColumn under @OneToMany, the error was gone.

    The doc says "You can omit @joincolumn in a @manytoone / @onetomany relation", but I feel that this information could be outdated.

  3. Romstar commented on Jan 27, 2024

    @Romstar

    I just ran into this issue, super annoying.

    with "typeorm": "^0.3.17"

    and postgresql of course

  4. github-actions commented on Sep 18, 2025

    @github-actions

    TypeORM has returned to active development after recently transitioning to new leadership (see related announcement).

    As part of the new team's efforts to prioritise work on the project moving forward, it is necessary to clean up the backlog of stale issues.

    🧹 This issue is being automatically closed because it has had no activity in the last 6 months.
    If you believe this issue is still relevant, feel free to comment below and the maintainers may reopen it. Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions