Skip to content

Strip whitespaces from column types #19

Description

@Helveg

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.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions