feat: add foreign key indexes (#17672)

This commit is contained in:
Jason Rasmussen
2025-04-17 14:41:06 -04:00
committed by GitHub
parent 81ed54aa61
commit e275f2d8b3
49 changed files with 382 additions and 285 deletions

View File

@@ -11,7 +11,8 @@ import { setUnion } from 'src/utils/set';
const GeneratedUuidV7Column = (options: Omit<ColumnOptions, 'type' | 'default' | 'nullable'> = {}) =>
Column({ ...options, type: 'uuid', nullable: false, default: () => `${immich_uuid_v7.name}()` });
export const UpdateIdColumn = () => GeneratedUuidV7Column();
export const UpdateIdColumn = (options: Omit<ColumnOptions, 'type' | 'default' | 'nullable'> = {}) =>
GeneratedUuidV7Column(options);
export const PrimaryGeneratedUuidV7Column = () => GeneratedUuidV7Column({ primary: true });