mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
* chore(server): remove unused device info code * chore: generate open api * remove any DeviceTypeEnum usage from mobile * chore: coverage * fix: drop device info table --------- Co-authored-by: Fynn Petersen-Frey <zody22@gmail.com>
27 lines
1.0 KiB
TypeScript
27 lines
1.0 KiB
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class DropDeviceInfoTable1682710252424 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`drop table device_info`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
create table if not exists device_info
|
|
(
|
|
id serial
|
|
constraint "PK_b1c15a80b0a4e5f4eebadbdd92c"
|
|
primary key,
|
|
"userId" varchar not null,
|
|
"deviceId" varchar not null,
|
|
"deviceType" varchar not null,
|
|
"notificationToken" varchar,
|
|
"createdAt" timestamp default now() not null,
|
|
"isAutoBackup" boolean default false not null,
|
|
constraint "UQ_ebad78f36b10d15fbea8560e107"
|
|
unique ("userId", "deviceId")
|
|
);
|
|
`);
|
|
}
|
|
}
|