Skip to content

Commit

Permalink
Initial add solana address support to project address
Browse files Browse the repository at this point in the history
  • Loading branch information
aminlatifi committed Dec 12, 2023
1 parent 0415865 commit dcacbfe
Show file tree
Hide file tree
Showing 17 changed files with 802 additions and 94 deletions.
23 changes: 23 additions & 0 deletions migration/1702374813793-addChainTypeToProjectAddressAndDonation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class addChainTypeToProjectAddressAndDonation1702374813793
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
// Add chainType to projectAddress
await queryRunner.query(
`ALTER TABLE "project_address" ADD "chainType" character varying NOT NULL DEFAULT 'EVM'`,
);
// Add chainType to donation
await queryRunner.query(
`ALTER TABLE "donation" ADD "chainType" character varying NOT NULL DEFAULT 'EVM'`,
);

// Update chainType for projectAddress
await queryRunner.query(`UPDATE "project_address" SET "chainType" = 'EVM'`);
// Update chainType for donation
await queryRunner.query(`UPDATE "donation" SET "chainType" = 'EVM'`);
}

public async down(queryRunner: QueryRunner): Promise<void> {}
}
Loading

0 comments on commit dcacbfe

Please sign in to comment.