Skip to content

migrations:generate : Incorrect column type comparison if the column is enum. (should not be lowercase for a custom name) #5000

@korniychuk

Description

@korniychuk

Issue type:

[ ] question
[x ] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[x] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[ ] latest
[ ] @next
[x] 0.2.20 (or put your version here)

Description:

Enum's with a custom name in Pascal Case (EExchangeCode in my example) handled incorrectly by the migration:generate.

Steps to reproduce or a small repository showing the problem:

I prepared a repository to demonstrate the problem with better description in README.md (with screenshots).

# preparation
git clone git@github.com:korniychuk/typeorm-migraion-enum-bug-demo.git
cd typeorm-migraion-enum-bug-demo
npm install
npm run db:docker:dev   # requires docker and docker-compose
npm run migrations:run

# demo of the problem
npm run migrations:diff test

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