Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rounds migration #139

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions migration/1730852418249-InsertEARounds.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class InsertEARounds1730852418249 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
INSERT INTO "early_access_round" (
"roundNumber", "startDate", "endDate", "roundUSDCapPerProject", "roundUSDCapPerUserPerProject", "tokenPrice", "isBatchMintingExecuted"
) VALUES
(1, '2024-11-06 12:00:00', '2024-11-11 12:00:00', 100000, 5000, null, false),
(2, '2024-11-11 12:00:00', '2024-11-16 12:00:00', 200000, 10000, null, false),
(3, '2024-11-16 12:00:00', '2024-11-21 12:00:00', 200000, 10000, null, false)
`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
DELETE FROM "early_access_round" WHERE "roundNumber" IN (1, 2, 3)
`);
}
}
47 changes: 47 additions & 0 deletions migration/1730852760371-InsertQAccRound.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class InsertQAccRound1730852760371 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
INSERT INTO "qf_round" (
"roundNumber",
"name",
"title",
"description",
"slug",
"beginDate",
"endDate",
"tokenPrice",
"roundUSDCapPerProject",
"roundUSDCloseCapPerProject",
"roundUSDCapPerUserPerProject",
"isBatchMintingExecuted",
"isActive",
"allocatedFund",
"minimumPassportScore"
) VALUES (
1,
'QAcc first round',
'First QAcc round',
'This is the first QAcc round',
'round-1',
'2024-11-25 12:00:00',
'2024-12-09 12:00:00',
NULL,
1000000,
1050000,
2500,
false,
true,
1000000,
0
)
`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
DELETE FROM "qf_round" WHERE "roundNumber" = 1
`);
}
}
Loading