Kononnable / typeorm-model-generator

Generates models for TypeORM from existing database.
MIT License
1.51k stars 281 forks source link

Model/Entity Generation for Postgres is not working for columns declared with Custom Type and DEFAULT expression #306

Open acisser opened 3 years ago

acisser commented 3 years ago

Generation is breaking with a SyntaxError Message

Source DDL for column definition in CREATE TABLE estate cms."MedicStateType" NOT NULL DEFAULT 'V',

Generated TypeORM Mapping @Column("enum",{ name:"estate",enum:["V","I"],default: () => "'V'."MedicStateType"", })

I guess there is some sort of issue in the quotation of the generated mapping ("'V'."MedicStateType"")