mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat: sync assets, partner assets, exif, and partner exif (#16658)
* feat: sync assets, partner assets, exif, and partner exif Co-authored-by: Zack Pollard <zack@futo.org> Co-authored-by: Alex Tran <alex.tran1502@gmail.com> * refactor: remove duplicate where clause and orderBy statements in sync queries * fix: asset deletes not filtering by ownerId --------- Co-authored-by: Zack Pollard <zack@futo.org> Co-authored-by: Alex Tran <alex.tran1502@gmail.com> Co-authored-by: Zack Pollard <zackpollard@ymail.com>
This commit is contained in:
parent
e97df503f2
commit
a96bba4b26
28 changed files with 2037 additions and 46 deletions
|
|
@ -55,7 +55,7 @@ class CustomWritable extends Writable {
|
|||
}
|
||||
}
|
||||
|
||||
type Asset = Insertable<Assets>;
|
||||
type Asset = Partial<Insertable<Assets>>;
|
||||
type User = Partial<Insertable<Users>>;
|
||||
type Session = Omit<Insertable<Sessions>, 'token'> & { token?: string };
|
||||
type Partner = Insertable<Partners>;
|
||||
|
|
@ -160,10 +160,6 @@ export class TestFactory {
|
|||
}
|
||||
|
||||
async create() {
|
||||
for (const asset of this.assets) {
|
||||
await this.context.createAsset(asset);
|
||||
}
|
||||
|
||||
for (const user of this.users) {
|
||||
await this.context.createUser(user);
|
||||
}
|
||||
|
|
@ -176,6 +172,10 @@ export class TestFactory {
|
|||
await this.context.createSession(session);
|
||||
}
|
||||
|
||||
for (const asset of this.assets) {
|
||||
await this.context.createAsset(asset);
|
||||
}
|
||||
|
||||
return this.context;
|
||||
}
|
||||
}
|
||||
|
|
@ -212,7 +212,7 @@ export class TestContext {
|
|||
versionHistory: VersionHistoryRepository;
|
||||
view: ViewRepository;
|
||||
|
||||
private constructor(private db: Kysely<DB>) {
|
||||
private constructor(public db: Kysely<DB>) {
|
||||
const logger = newLoggingRepositoryMock() as unknown as LoggingRepository;
|
||||
const config = new ConfigRepository();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue