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',
|
language: 'PLPGSQL',
|
||||||
body: `
|
body: `
|
||||||
BEGIN
|
BEGIN
|
||||||
INSERT INTO asset_edit_audit ("assetId")
|
INSERT INTO asset_edit_audit ("editId", "assetId")
|
||||||
SELECT "assetId"
|
SELECT "id", "assetId"
|
||||||
FROM OLD;
|
FROM OLD;
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END`,
|
END`,
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ export class AssetEditAuditTable {
|
|||||||
@PrimaryGeneratedUuidV7Column()
|
@PrimaryGeneratedUuidV7Column()
|
||||||
id!: Generated<string>;
|
id!: Generated<string>;
|
||||||
|
|
||||||
|
@Column({ type: 'uuid' })
|
||||||
|
editId!: string;
|
||||||
|
|
||||||
@Column({ type: 'uuid', index: true })
|
@Column({ type: 'uuid', index: true })
|
||||||
assetId!: string;
|
assetId!: string;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user