diff options
author | Hsuan Lee <hsuan@cobinhood.com> | 2019-01-19 18:42:04 +0800 |
---|---|---|
committer | Hsuan Lee <hsuan@cobinhood.com> | 2019-01-19 18:42:04 +0800 |
commit | 7ae38906926dc09bc10670c361af0d2bf0050426 (patch) | |
tree | 5fb10ae366b987db09e4ddb4bc3ba0f75404ad08 /packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts | |
parent | b5fd3c72a08aaa6957917d74c333387a16edf66b (diff) | |
download | dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.gz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.bz2 dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.lz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.xz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.zst dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.zip |
Update dependency packages
Diffstat (limited to 'packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts')
-rw-r--r-- | packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts b/packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts deleted file mode 100644 index 838f5ba9c..000000000 --- a/packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { MigrationInterface, QueryRunner } from 'typeorm'; - -export class NewMetadataAndOHLCVTables1542655823221 implements MigrationInterface { - // tslint:disable-next-line - public async up(queryRunner: QueryRunner): Promise<any> { - await queryRunner.query(` - CREATE TABLE raw.token_metadata ( - address VARCHAR NOT NULL, - authority VARCHAR NOT NULL, - decimals INT NULL, - symbol VARCHAR NULL, - name VARCHAR NULL, - - PRIMARY KEY (address, authority) - ); - `); - - await queryRunner.dropTable('raw.token_on_chain_metadata'); - - await queryRunner.query(` - CREATE TABLE raw.ohlcv_external ( - exchange VARCHAR NOT NULL, - from_symbol VARCHAR NOT NULL, - to_symbol VARCHAR NOT NULL, - start_time BIGINT NOT NULL, - end_time BIGINT NOT NULL, - - open DOUBLE PRECISION NOT NULL, - close DOUBLE PRECISION NOT NULL, - low DOUBLE PRECISION NOT NULL, - high DOUBLE PRECISION NOT NULL, - volume_from DOUBLE PRECISION NOT NULL, - volume_to DOUBLE PRECISION NOT NULL, - - source VARCHAR NOT NULL, - observed_timestamp BIGINT NOT NULL, - - PRIMARY KEY (exchange, from_symbol, to_symbol, start_time, end_time, source, observed_timestamp) - ); - `); - } - - // tslint:disable-next-line - public async down(queryRunner: QueryRunner): Promise<any> { - await queryRunner.query(` - CREATE TABLE raw.token_on_chain_metadata ( - address VARCHAR NOT NULL, - decimals INT NULL, - symbol VARCHAR NULL, - name VARCHAR NULL, - - PRIMARY KEY (address) - ); - `); - - await queryRunner.dropTable('raw.token_metadata'); - - await queryRunner.dropTable('raw.ohlcv_external'); - } -} |