8000 Postgres: Gist index on daterange column recreated every migration · Issue #10567 · typeorm/typeorm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Postgres: Gist index on daterange column recreated every migration #10567
Closed
@jorenvandeweyer

Description

@jorenvandeweyer

Issue description

Postgres: Gist index on daterange column recreated every migration

Expected Behavior

Create the index once.

Actual Behavior

Typeorm drops the index and recreates it every time a new migration is generated.

Steps to reproduce

@Entity()
class AddressHistory {
  @PrimaryGeneratedColumn('uuid')
  uuid: string

  @CreateDateColumn()
  createdAt: Date

  @UpdateDateColumn()
  updatedAt: Date

  @Column({ type: 'uuid' })
  entityUuid: string

  @Column({ type: 'uuid' })
  addressUuid: string

  @Index({ spatial: true })
  @Column({ type: 'daterange' })
  daterange: string
}

My Environment

Dependency Version
Operating System MacOS
Node.js version 20.5.1
Typescript version 5.2.2
TypeORM version 0.3.17

Additional Context

No response

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, but I don't know how to start. I would need guidance.

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

      0