-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial add solana address support to project address
- Loading branch information
1 parent
0415865
commit dcacbfe
Showing
17 changed files
with
802 additions
and
94 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
migration/1702374813793-addChainTypeToProjectAddressAndDonation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> {} | ||
} |
Oops, something went wrong.