mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix: audit table implementation
This commit is contained in:
@@ -293,8 +293,8 @@ export const asset_edit_audit = registerFunction({
|
||||
language: 'PLPGSQL',
|
||||
body: `
|
||||
BEGIN
|
||||
INSERT INTO asset_edit_audit ("assetId")
|
||||
SELECT "assetId"
|
||||
INSERT INTO asset_edit_audit ("editId", "assetId")
|
||||
SELECT "id", "assetId"
|
||||
FROM OLD;
|
||||
RETURN NULL;
|
||||
END`,
|
||||
|
||||
@@ -6,6 +6,9 @@ export class AssetEditAuditTable {
|
||||
@PrimaryGeneratedUuidV7Column()
|
||||
id!: Generated<string>;
|
||||
|
||||
@Column({ type: 'uuid' })
|
||||
editId!: string;
|
||||
|
||||
@Column({ type: 'uuid', index: true })
|
||||
assetId!: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user