Skip to content

Can not create indexes of materialized views #8459

@jeromeSH26

Description

@jeromeSH26

running last release of typeorm.

Adding@Index()to a @ViewColumn() of a materialized view doesn't create the index. has to create it manually

@ViewEntity({
  name: "vw_all_articles",
  expression: sqlExpression,
  materialized: true,
})
class AllArticlesView implements TALLArticlesWiew {
  @Index("idxAllArticleVW_Article_id", {
    unique: true,
  })
  @ViewColumn()
  article_id: IArticles["id"];
}

Can see that the materialized view is well created but not the index.
image

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