feat: rename schema (#19891)

This commit is contained in:
Jason Rasmussen
2025-07-14 10:13:06 -04:00
committed by GitHub
parent 33c29e4305
commit c699df002a
103 changed files with 4378 additions and 3224 deletions

View File

@@ -8,13 +8,13 @@ export class TrashRepository {
constructor(@InjectKysely() private db: Kysely<DB>) {}
getDeletedIds(): AsyncIterableIterator<{ id: string }> {
return this.db.selectFrom('assets').select(['id']).where('status', '=', AssetStatus.DELETED).stream();
return this.db.selectFrom('asset').select(['id']).where('status', '=', AssetStatus.DELETED).stream();
}
@GenerateSql({ params: [DummyValue.UUID] })
async restore(userId: string): Promise<number> {
const { numUpdatedRows } = await this.db
.updateTable('assets')
.updateTable('asset')
.where('ownerId', '=', userId)
.where('status', '=', AssetStatus.TRASHED)
.set({ status: AssetStatus.ACTIVE, deletedAt: null })
@@ -26,7 +26,7 @@ export class TrashRepository {
@GenerateSql({ params: [DummyValue.UUID] })
async empty(userId: string): Promise<number> {
const { numUpdatedRows } = await this.db
.updateTable('assets')
.updateTable('asset')
.where('ownerId', '=', userId)
.where('status', '=', AssetStatus.TRASHED)
.set({ status: AssetStatus.DELETED })
@@ -42,7 +42,7 @@ export class TrashRepository {
}
const { numUpdatedRows } = await this.db
.updateTable('assets')
.updateTable('asset')
.where('status', '=', AssetStatus.TRASHED)
.where('id', 'in', ids)
.set({ status: AssetStatus.ACTIVE, deletedAt: null })