aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-11-14 07:44:53 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-12-05 06:24:48 +0800
commita948305e7a488ad01404fa04c95dacc98b4b0061 (patch)
treed3987acf270636a9379b69b0c57dadc875858d73
parent26280e4aba147ad6000b9df309e64db84b6932fc (diff)
downloaddexon-sol-tools-a948305e7a488ad01404fa04c95dacc98b4b0061.tar
dexon-sol-tools-a948305e7a488ad01404fa04c95dacc98b4b0061.tar.gz
dexon-sol-tools-a948305e7a488ad01404fa04c95dacc98b4b0061.tar.bz2
dexon-sol-tools-a948305e7a488ad01404fa04c95dacc98b4b0061.tar.lz
dexon-sol-tools-a948305e7a488ad01404fa04c95dacc98b4b0061.tar.xz
dexon-sol-tools-a948305e7a488ad01404fa04c95dacc98b4b0061.tar.zst
dexon-sol-tools-a948305e7a488ad01404fa04c95dacc98b4b0061.zip
Rename taker and maker amounts in sra_orders
-rw-r--r--packages/pipeline/migrations/1542152278484-RenameSraOrdersFilledAmounts.ts13
-rw-r--r--packages/pipeline/src/entities/sra_order.ts4
2 files changed, 15 insertions, 2 deletions
diff --git a/packages/pipeline/migrations/1542152278484-RenameSraOrdersFilledAmounts.ts b/packages/pipeline/migrations/1542152278484-RenameSraOrdersFilledAmounts.ts
new file mode 100644
index 000000000..a13e3efa5
--- /dev/null
+++ b/packages/pipeline/migrations/1542152278484-RenameSraOrdersFilledAmounts.ts
@@ -0,0 +1,13 @@
+import { MigrationInterface, QueryRunner } from 'typeorm';
+
+export class RenameSraOrdersFilledAmounts1542152278484 implements MigrationInterface {
+ public async up(queryRunner: QueryRunner): Promise<any> {
+ await queryRunner.renameColumn('raw.sra_orders', 'maker_asset_filled_amount', 'maker_asset_amount');
+ await queryRunner.renameColumn('raw.sra_orders', 'taker_asset_filled_amount', 'taker_asset_amount');
+ }
+
+ public async down(queryRunner: QueryRunner): Promise<any> {
+ await queryRunner.renameColumn('raw.sra_orders', 'maker_asset_amount', 'maker_asset_filled_amount');
+ await queryRunner.renameColumn('raw.sra_orders', 'taker_asset_amount', 'taker_asset_filled_amount');
+ }
+}
diff --git a/packages/pipeline/src/entities/sra_order.ts b/packages/pipeline/src/entities/sra_order.ts
index 2bdb1ba2e..4b7f652d3 100644
--- a/packages/pipeline/src/entities/sra_order.ts
+++ b/packages/pipeline/src/entities/sra_order.ts
@@ -19,9 +19,9 @@ export class SraOrder {
public feeRecipientAddress!: string;
@Column({ name: 'sender_address' })
public senderAddress!: string;
- @Column({ name: 'maker_asset_filled_amount' })
+ @Column({ name: 'maker_asset_amount' })
public makerAssetAmount!: string;
- @Column({ name: 'taker_asset_filled_amount' })
+ @Column({ name: 'taker_asset_amount' })
public takerAssetAmount!: string;
@Column({ name: 'maker_fee' })
public makerFee!: string;