Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.
/ models Public archive

Commit 5609377

Browse files
committed
feat: add pruned status to package and repository
1 parent 16a3efd commit 5609377

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/models/package.ts

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ export class Package {
1616
// @ts-ignore
1717
isCurrent: boolean
1818

19+
@Column('bool', { nullable: false })
20+
@Index('package_current_idx')
21+
// @ts-ignore
22+
isPruned: boolean
23+
1924
@ManyToOne(() => Repository, repo => repo.slug, { nullable: false })
2025
@JoinColumn({ name: 'repositorySlug' })
2126
// @ts-ignore

src/models/repository.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Column, Entity, PrimaryColumn } from 'typeorm'
1+
import { Column, Entity, Index, PrimaryColumn } from 'typeorm'
22

33
@Entity()
44
export class Repository {
@@ -50,4 +50,9 @@ export class Repository {
5050

5151
@Column('text', { nullable: true })
5252
sileoEndpoint?: string
53+
54+
@Column('bool', { nullable: false })
55+
@Index('package_current_idx')
56+
// @ts-ignore
57+
isPruned: boolean
5358
}

0 commit comments

Comments
 (0)