184a662fda
* fix(server): remove hidden assets from albums * fix: linting --------- Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
14 lines
424 B
TypeScript
14 lines
424 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class RemoveHiddenAssetsFromAlbums1725730782681 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
`DELETE FROM "albums_assets_assets" WHERE "assetsId" IN (SELECT "id" FROM "assets" WHERE "isVisible" = false)`,
|
|
);
|
|
}
|
|
|
|
public async down(): Promise<void> {
|
|
// noop
|
|
}
|
|
}
|