Closed
Description
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.