Skip to content

Commit

Permalink
update column parameters
Browse files Browse the repository at this point in the history
update some of the default parameters of the columns in the new database
  • Loading branch information
DJensen94 committed Mar 19, 2024
1 parent 9407af6 commit 8a1ba7b
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion backend/src/models/mini_data_lake/cert_scans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class CertScan extends BaseEntity {
})
pem: string | null;

@Column()
@Column({nullable: true})

Check failure on line 38 in backend/src/models/mini_data_lake/cert_scans.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `nullable:·true` with `·nullable:·true·`
sctExists: boolean;

@Column({ nullable: true, type: 'timestamp' })
Expand Down
2 changes: 1 addition & 1 deletion backend/src/models/mini_data_lake/contacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class Contact extends BaseEntity {
})
type: string | null;

@Column()
@Column({nullable: true})

Check failure on line 44 in backend/src/models/mini_data_lake/contacts.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `nullable:·true` with `·nullable:·true·`
retired: boolean;

@ManyToMany((type) => Organization, (org) => org.contacts, {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/models/mini_data_lake/host_scans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class HostScan extends BaseEntity {
})
hostname: string | null;

@Column()
@Column({nullable: true})

Check failure on line 54 in backend/src/models/mini_data_lake/host_scans.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `nullable:·true` with `·nullable:·true·`
latest: boolean;

@Column({
Expand Down
2 changes: 1 addition & 1 deletion backend/src/models/mini_data_lake/hosts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class Host extends BaseEntity {
})
currStage: string | null;

@Column()
@Column({nullable: true})

Check failure on line 84 in backend/src/models/mini_data_lake/hosts.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `nullable:·true` with `·nullable:·true·`
hostLive: boolean;

@Column({
Expand Down
2 changes: 1 addition & 1 deletion backend/src/models/mini_data_lake/kevs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class Kev extends BaseEntity {
})
cve: string | null;

@Column()
@Column({nullable: true})

Check failure on line 26 in backend/src/models/mini_data_lake/kevs.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `nullable:·true` with `·nullable:·true·`
knownRansomware: boolean;

@OneToMany((type) => Ticket, (ticket) => ticket.kev, {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/models/mini_data_lake/precert_scans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class PrecertScan extends BaseEntity {
})
pem: string | null;

@Column()
@Column({nullable: true})

Check failure on line 38 in backend/src/models/mini_data_lake/precert_scans.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `nullable:·true` with `·nullable:·true·`
sctExists: boolean;

@Column({ nullable: true, type: 'timestamp' })
Expand Down
2 changes: 1 addition & 1 deletion backend/src/models/mini_data_lake/reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class Report extends BaseEntity {
@Column({ nullable: true, type: 'timestamp' })
createdTimestamp: Date | null;

@Column('simple-array')
@Column("varchar", { array: true, default: []})

Check failure on line 23 in backend/src/models/mini_data_lake/reports.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `"varchar",·{·array:·true,·default:·[]` with `'varchar',·{·array:·true,·default:·[]·`
reportTypes: string[];

@ManyToOne((type) => Snapshot, (snapshot) => snapshot.reports, {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/models/mini_data_lake/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class Request extends BaseEntity {
@Column({ nullable: true })
retired: boolean;

@Column('simple-array')
@Column("varchar", { array: true, default: []})

Check failure on line 62 in backend/src/models/mini_data_lake/requests.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `"varchar",·{·array:·true,·default:·[]` with `'varchar',·{·array:·true,·default:·[]·`
reportTypes: string[];

@Column({
Expand Down
4 changes: 2 additions & 2 deletions backend/src/models/mini_data_lake/snapshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ export class Snapshot extends BaseEntity {
@Column({ nullable: true, type: 'timestamp' })
updatedTimestamp: Date | null;

@Column()
@Column({nullable: true})

Check failure on line 53 in backend/src/models/mini_data_lake/snapshots.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `nullable:·true` with `·nullable:·true·`
latest: boolean;

@Column('simple-array')
@Column("varchar", { array: true, default: []})

Check failure on line 56 in backend/src/models/mini_data_lake/snapshots.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `"varchar",·{·array:·true,·default:·[]` with `'varchar',·{·array:·true,·default:·[]·`
networks: string[];

@ManyToOne((type) => Organization, (org) => org.snapshots, {
Expand Down
4 changes: 2 additions & 2 deletions backend/src/models/mini_data_lake/tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import {
Entity,
Column,
PrimaryColumn,
PrimaryGeneratedColumn,
BaseEntity,
ManyToMany,
JoinTable
Expand All @@ -12,7 +12,7 @@ import {
import { Organization } from './organizations';
@Entity()
export class Tag extends BaseEntity {
@PrimaryColumn()
@PrimaryGeneratedColumn()
id: string;

@Column({
Expand Down
2 changes: 1 addition & 1 deletion backend/src/models/mini_data_lake/tickets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class Ticket extends BaseEntity {
})
vprScore: number | null;

@Column()
@Column({nullable: true})
falsePositive: boolean;

@Column({
Expand Down
4 changes: 2 additions & 2 deletions backend/src/models/mini_data_lake/trustymail_scans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class TrustymailScan extends BaseEntity {
})
dmarcResultsBaseDomain: string | null;

@Column()
@Column({nullable: true})
domainSupportsSmtp: boolean;

@Column({
Expand All @@ -77,7 +77,7 @@ export class TrustymailScan extends BaseEntity {
})
domainSupportsSmtpResults: string | null;

@Column()
@Column({nullable: true})
domainSupportsStarttls: boolean;

@Column({
Expand Down
2 changes: 1 addition & 1 deletion backend/src/models/mini_data_lake/vuln_scans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class VulnScan extends BaseEntity {
})
ip: Ip;

@Column()
@Column({nullable: true})
latest: boolean;

@Column({
Expand Down

0 comments on commit 8a1ba7b

Please sign in to comment.