-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use sdk coingecko, use floats for prices
Signed-off-by: david <david@umaproject.org>
- Loading branch information
Showing
6 changed files
with
98 additions
and
61 deletions.
There are no files selected for viewing
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
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
55 changes: 55 additions & 0 deletions
55
packages/indexer-database/src/migrations/1736274243965-RelayHashInfo.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,55 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
||
export class RelayHashInfo1736274243965 implements MigrationInterface { | ||
name = "RelayHashInfo1736274243965"; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE "relay_hash_info" DROP COLUMN "bridgeFeeUsd"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "relay_hash_info" ADD "bridgeFeeUsd" double precision`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "relay_hash_info" DROP COLUMN "inputPriceUsd"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "relay_hash_info" ADD "inputPriceUsd" double precision`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "relay_hash_info" DROP COLUMN "outputPriceUsd"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "relay_hash_info" ADD "outputPriceUsd" double precision`, | ||
); | ||
await queryRunner.query(`ALTER TABLE "historic_price" DROP COLUMN "price"`); | ||
await queryRunner.query( | ||
`ALTER TABLE "historic_price" ADD "price" double precision NOT NULL`, | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "historic_price" DROP COLUMN "price"`); | ||
await queryRunner.query( | ||
`ALTER TABLE "historic_price" ADD "price" numeric NOT NULL`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "relay_hash_info" DROP COLUMN "outputPriceUsd"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "relay_hash_info" ADD "outputPriceUsd" integer`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "relay_hash_info" DROP COLUMN "inputPriceUsd"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "relay_hash_info" ADD "inputPriceUsd" integer`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "relay_hash_info" DROP COLUMN "bridgeFeeUsd"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "relay_hash_info" ADD "bridgeFeeUsd" character varying`, | ||
); | ||
} | ||
} |
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
This file was deleted.
Oops, something went wrong.
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