mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 17:25:35 +03:00
feat: add createdAt to integrity report table
refactor: rename checksum_fail to checksum_mismatched
This commit is contained in:
@@ -485,7 +485,7 @@ export enum CacheControl {
|
||||
export enum IntegrityReportType {
|
||||
OrphanFile = 'orphan_file',
|
||||
MissingFile = 'missing_file',
|
||||
ChecksumFail = 'checksum_fail',
|
||||
ChecksumFail = 'checksum_mismatch',
|
||||
}
|
||||
|
||||
export enum ImmichEnvironment {
|
||||
|
||||
@@ -5,6 +5,7 @@ export async function up(db: Kysely<any>): Promise<void> {
|
||||
"id" uuid NOT NULL DEFAULT uuid_generate_v4(),
|
||||
"type" character varying NOT NULL,
|
||||
"path" character varying NOT NULL,
|
||||
"createdAt" timestamp with time zone NOT NULL DEFAULT now(),
|
||||
CONSTRAINT "integrity_report_type_path_uq" UNIQUE ("type", "path"),
|
||||
CONSTRAINT "integrity_report_pkey" PRIMARY KEY ("id")
|
||||
);`.execute(db);
|
||||
@@ -1,11 +1,5 @@
|
||||
import { IntegrityReportType } from 'src/enum';
|
||||
import {
|
||||
Column,
|
||||
Generated,
|
||||
PrimaryGeneratedColumn,
|
||||
Table,
|
||||
Unique
|
||||
} from 'src/sql-tools';
|
||||
import { Column, CreateDateColumn, Generated, PrimaryGeneratedColumn, Table, Timestamp, Unique } from 'src/sql-tools';
|
||||
|
||||
@Table('integrity_report')
|
||||
@Unique({ columns: ['type', 'path'] })
|
||||
@@ -18,4 +12,7 @@ export class IntegrityReportTable {
|
||||
|
||||
@Column()
|
||||
path!: string;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Generated<Timestamp>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user