Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip whitespaces from column types #19

Open
Helveg opened this issue Apr 2, 2024 · 0 comments
Open

Strip whitespaces from column types #19

Helveg opened this issue Apr 2, 2024 · 0 comments

Comments

@Helveg
Copy link

Helveg commented Apr 2, 2024

Currently the following entity (among many other types):

import { CreateDateColumn, Entity, PrimaryColumn } from 'typeorm';

@Entity()
export SomeEntity {
  @PrimaryGeneratedColumn('uuid')
  id!: string;

  @CreateDateColumn()
  createdAt!: Date;
}

renders the following invalid mermaid code:

erDiagram
  some_entity {
    character varying id PK
    timestamp without time zone createdAt
  }
Loading

because the type of the id column is rendered as character varying (with whitespace). There's also timestamp without time zone, timestamp with time zone, character varying, double precision, and likely others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant