mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix: partner asset and exif sync backfill (#19224)
* fix: partner asset sync backfill * fix: add partner asset exif backfill * ci: output content of files that have changed
This commit is contained in:
parent
db68d1af9b
commit
749f63e4a0
21 changed files with 607 additions and 37 deletions
|
|
@ -0,0 +1,10 @@
|
|||
import { Kysely, sql } from 'kysely';
|
||||
|
||||
export async function up(db: Kysely<any>): Promise<void> {
|
||||
await sql`ALTER TABLE "partners" ADD "createId" uuid NOT NULL DEFAULT immich_uuid_v7();`.execute(db);
|
||||
await sql`UPDATE "partners" SET "createId" = immich_uuid_v7("createdAt")`.execute(db);
|
||||
}
|
||||
|
||||
export async function down(db: Kysely<any>): Promise<void> {
|
||||
await sql`ALTER TABLE "partners" DROP COLUMN "createId";`.execute(db);
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { UpdatedAtTrigger, UpdateIdColumn } from 'src/decorators';
|
||||
import { CreateIdColumn, UpdatedAtTrigger, UpdateIdColumn } from 'src/decorators';
|
||||
import { partners_delete_audit } from 'src/schema/functions';
|
||||
import { UserTable } from 'src/schema/tables/user.table';
|
||||
import { AfterDeleteTrigger, Column, CreateDateColumn, ForeignKeyColumn, Table, UpdateDateColumn } from 'src/sql-tools';
|
||||
|
|
@ -27,6 +27,9 @@ export class PartnerTable {
|
|||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
|
||||
@CreateIdColumn()
|
||||
createId!: string;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt!: Date;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue