aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/migrations/1547153875669-UpdateDDexAPIToV3.ts
blob: 957af4941578ecd34bf658104215235172c7c0d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { MigrationInterface, QueryRunner } from 'typeorm';

export class UpdateDDexAPIToV31547153875669 implements MigrationInterface {
    public async up(queryRunner: QueryRunner): Promise<any> {
        await queryRunner.query(`
        UPDATE raw.token_orderbook_snapshots
        SET quote_asset_symbol='WETH'
        WHERE quote_asset_symbol='ETH' AND
        source='ddex';
        `);
    }

    public async down(queryRunner: QueryRunner): Promise<any> {
        await queryRunner.query(`
        UPDATE raw.token_orderbook_snapshots
        SET quote_asset_symbol='ETH'
        WHERE quote_asset_symbol='WETH' AND
        source='ddex';
        `);
    }
}