fix(server): Handle exposure time correctly (#1432)

This commit is contained in:
Alex
2023-01-26 13:14:05 -06:00
committed by GitHub
parent bcb0056b55
commit 8b73c2bf8a
12 changed files with 31 additions and 24 deletions

View File

@@ -72,8 +72,8 @@ export class ExifEntity {
@Column({ type: 'integer', nullable: true })
iso!: number | null;
@Column({ type: 'float', nullable: true })
exposureTime!: number | null;
@Column({ type: 'varchar', nullable: true })
exposureTime!: string | null;
/* Video info */
@Column({ type: 'float8', nullable: true })

View File

@@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class AlterExifExposureTimeToString1674757936889 implements MigrationInterface {
name = 'AlterExifExposureTimeToString1674757936889'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "exif" DROP COLUMN "exposureTime"`);
await queryRunner.query(`ALTER TABLE "exif" ADD "exposureTime" character varying`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "exif" DROP COLUMN "exposureTime"`);
await queryRunner.query(`ALTER TABLE "exif" ADD "exposureTime" double precision`);
}
}