From 9a71560768e8bffa363fadf0e74cc7561b2a3a65 Mon Sep 17 00:00:00 2001 From: ali Date: Wed, 6 Nov 2024 04:14:46 +0330 Subject: [PATCH 1/2] add migration to insert EA rounds --- migration/1730852418249-InsertEARounds.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 migration/1730852418249-InsertEARounds.ts diff --git a/migration/1730852418249-InsertEARounds.ts b/migration/1730852418249-InsertEARounds.ts new file mode 100644 index 000000000..4be5d819c --- /dev/null +++ b/migration/1730852418249-InsertEARounds.ts @@ -0,0 +1,20 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class InsertEARounds1730852418249 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + 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 { + await queryRunner.query(` + DELETE FROM "early_access_round" WHERE "roundNumber" IN (1, 2, 3) + `); + } +} From a23bd835243417a58f4701b6d17d603019767686 Mon Sep 17 00:00:00 2001 From: ali Date: Wed, 6 Nov 2024 04:15:00 +0330 Subject: [PATCH 2/2] add migration to insert QAcc round --- migration/1730852760371-InsertQAccRound.ts | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 migration/1730852760371-InsertQAccRound.ts diff --git a/migration/1730852760371-InsertQAccRound.ts b/migration/1730852760371-InsertQAccRound.ts new file mode 100644 index 000000000..56b43f1bb --- /dev/null +++ b/migration/1730852760371-InsertQAccRound.ts @@ -0,0 +1,47 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class InsertQAccRound1730852760371 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + 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 { + await queryRunner.query(` + DELETE FROM "qf_round" WHERE "roundNumber" = 1 + `); + } +}