fix: audit table implementation

This commit is contained in:
bwees
2026-02-18 23:40:25 -06:00
parent 22317b0360
commit 54e6dd1697
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -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;