mirror of
https://github.com/immich-app/immich.git
synced 2025-11-09 00:03:09 -05:00
* Refactor docker-compose to its own folder * Added FastAPI development environment * Added support for GPU in docker file * Added image classification * creating endpoint for smart Image info * added logo with white background on ios * Added endpoint and trigger for image tagging * Classify image and save into database * Update readme
31 lines
976 B
TypeScript
31 lines
976 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class CreateSmartInfoTable1645130870184 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
create table if not exists smart_info
|
|
(
|
|
id serial
|
|
constraint "PK_0beace66440e9713f5c40470e46"
|
|
primary key,
|
|
"assetId" uuid not null
|
|
constraint "UQ_5e3753aadd956110bf3ec0244ac"
|
|
unique
|
|
constraint "FK_5e3753aadd956110bf3ec0244ac"
|
|
references assets
|
|
on delete cascade,
|
|
tags text[]
|
|
);
|
|
|
|
create unique index if not exists "IDX_5e3753aadd956110bf3ec0244a"
|
|
on smart_info ("assetId");
|
|
`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
drop table smart_info;
|
|
`);
|
|
}
|
|
}
|