perf: add database indexes, implement caching, enforce permission guards, and sanitize external URLs
Build and Push Multi-Platform Images / build-and-push (push) Successful in 48s

This commit is contained in:
bjoernpoettker committed 2026-05-10 22:01:06 +02:00
1 parent 351938aa5c
commit aa4c181b0c
14 files changed
+94 -40

No files matched your search

@@ -66,7 +66,7 @@ const entities = [
password: config.get<string>('DB_PASSWORD', ''),
database: config.get<string>('DB_DATABASE', 'paperlessadd'),
entities,
synchronize: true,
synchronize: config.get<string>('NODE_ENV') !== 'production',
charset: 'utf8mb4',
}),
}),
@@ -1,16 +1,18 @@
import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Entity('PostprocessingLogs')
export class PostprocessingLog {
@PrimaryGeneratedColumn()
Id!: number;
@Index()
@Column({ type: 'int' })
PostprocessingId!: number;
@Column({ type: 'int', nullable: true })
ActionId!: number | null;
@Index()
@Column({ type: 'int' })
DocumentId!: number;
@@ -20,6 +22,7 @@ export class PostprocessingLog {
@Column({ type: 'text', nullable: true })
Message!: string | null;
@Index()
@Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
CreatedAt!: Date;
}