mirror of
https://github.com/immich-app/immich.git
synced 2025-06-23 15:30:51 -04:00
22 lines
724 B
TypeScript
22 lines
724 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class UpdateOpusCodecToLibopus1694758412194 implements MigrationInterface {
|
|
name = 'UpdateOpusCodecToLibopus1694758412194'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
UPDATE system_config
|
|
SET value = '"libopus"'
|
|
WHERE key = 'ffmpeg.targetAudioCodec' AND value = '"opus"'
|
|
`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
UPDATE system_config
|
|
SET value = '"opus"'
|
|
WHERE key = 'ffmpeg.targetAudioCodec' AND value = '"libopus"'
|
|
`);
|
|
}
|
|
}
|