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', 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;