diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-12-06 03:08:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 03:08:19 +0800 |
commit | b2dd5495bcf13a9ea71498b5def12c75589b0156 (patch) | |
tree | 0e0d728d540e747c32a083d604d7916a35ea95cf /packages/pipeline/migrations/1543980079179-ConvertTokenMetadataDecimalsToBigNumber.ts | |
parent | 72a30260d88e722a6b076134693360c573f6c70f (diff) | |
parent | e0348f9c044b4909260e4864398b4f50232da620 (diff) | |
download | dexon-0x-contracts-b2dd5495bcf13a9ea71498b5def12c75589b0156.tar.gz dexon-0x-contracts-b2dd5495bcf13a9ea71498b5def12c75589b0156.tar.zst dexon-0x-contracts-b2dd5495bcf13a9ea71498b5def12c75589b0156.zip |
Merge pull request #1377 from 0xProject/feature/pipeline-cleanup-mega-rebase
Merge all pipeline code into development
Diffstat (limited to 'packages/pipeline/migrations/1543980079179-ConvertTokenMetadataDecimalsToBigNumber.ts')
-rw-r--r-- | packages/pipeline/migrations/1543980079179-ConvertTokenMetadataDecimalsToBigNumber.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/pipeline/migrations/1543980079179-ConvertTokenMetadataDecimalsToBigNumber.ts b/packages/pipeline/migrations/1543980079179-ConvertTokenMetadataDecimalsToBigNumber.ts new file mode 100644 index 000000000..351bc7eb8 --- /dev/null +++ b/packages/pipeline/migrations/1543980079179-ConvertTokenMetadataDecimalsToBigNumber.ts @@ -0,0 +1,17 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class ConvertTokenMetadataDecimalsToBigNumber1543980079179 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise<any> { + await queryRunner.query( + `ALTER TABLE raw.token_metadata + ALTER COLUMN decimals TYPE numeric USING decimals::numeric;`, + ); + } + + public async down(queryRunner: QueryRunner): Promise<any> { + await queryRunner.query( + `ALTER TABLE raw.token_metadata + ALTER COLUMN decimals TYPE numeric USING decimals::integer;`, + ); + } +} |