Skip to content

Commit

Permalink
Merge pull request #1522 from Giveth/add-allocatedFundUSDPreferred-an…
Browse files Browse the repository at this point in the history
…d-allocatedFundUSD-to-qfRound

add allocatedFundUSDPreferred and allocatedFundUSD to qfRound
  • Loading branch information
RamRamez authored May 2, 2024
2 parents 0955db2 + 7a0442c commit ac5c0e2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
10 changes: 7 additions & 3 deletions migration/1714566501335-addTokenAndChainToQFRound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ export class AddTokenAndChainToQFRound1714566501335
await queryRunner.query(`
ALTER TABLE IF EXISTS "qf_round"
ADD COLUMN IF NOT EXISTS "allocatedTokenSymbol" text,
ADD COLUMN IF NOT EXISTS "allocatedTokenChainId" integer;
`);
ADD COLUMN IF NOT EXISTS "allocatedTokenChainId" integer,
ADD COLUMN IF NOT EXISTS "allocatedFundUSDPreferred" boolean,
ADD COLUMN IF NOT EXISTS "allocatedFundUSD" integer;
`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE IF EXISTS "qf_round"
DROP COLUMN "allocatedTokenSymbol",
DROP COLUMN "allocatedTokenChainId";
DROP COLUMN "allocatedTokenChainId",
DROP COLUMN "allocatedFundUSDPreferred",
DROP COLUMN "allocatedFundUSD";
`);
}
}
8 changes: 8 additions & 0 deletions src/entities/qfRound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ export class QfRound extends BaseEntity {
@Column()
allocatedFund: number;

@Field(_type => Number, { nullable: true })
@Column({ nullable: true })
allocatedFundUSD: number;

@Field(_type => Boolean, { nullable: true })
@Column({ nullable: true })
allocatedFundUSDPreferred: boolean;

@Field(_type => String, { nullable: true })
@Column({ nullable: true })
allocatedTokenSymbol: string;
Expand Down

0 comments on commit ac5c0e2

Please sign in to comment.