feat: updateId uuidv7 column for all entities with updatedAt (#16353)

This commit is contained in:
Zack Pollard
2025-02-27 12:55:22 +00:00
committed by GitHub
parent 128d653fc6
commit 967c69317b
18 changed files with 222 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
import { UserEntity } from 'src/entities/user.entity';
import { Permission } from 'src/enum';
import { Column, CreateDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
import { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
@Entity('api_keys')
export class APIKeyEntity {
@@ -27,4 +27,8 @@ export class APIKeyEntity {
@UpdateDateColumn({ type: 'timestamptz' })
updatedAt!: Date;
@Index('IDX_api_keys_update_id')
@Column({ type: 'uuid', nullable: false, default: () => 'immich_uuid_v7()' })
updateId?: string;
}