Skip to content

Migrations skip materialized views indices #6628

@feimosi

Description

@feimosi

Issue type:

[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.25 (latest at the time of reporting this)

Steps to reproduce or a small repository showing the problem:

  1. Create a materialized view with index
@ViewEntity({
  expression:
  `SELECT ...`,
  materialized: true,
})
export class UserTotal {
  @ViewColumn()
  @Index()
  userId!: string;

  ...
}
  1. Run typeorm migration:generate

  2. Check the migration file. It's missing CREATE INDEX query.

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