aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/migrations/1544131464368-CreateERC20ApprovalEvents.ts
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-15 07:58:34 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-15 07:58:34 +0800
commit8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023 (patch)
tree608b52c60fb24777274de78174e69b88a75362e0 /packages/pipeline/migrations/1544131464368-CreateERC20ApprovalEvents.ts
parent67422db4bd0b194296a1a584af7ead089e281715 (diff)
parent6d45beccad44e86ddd692d0cf54c09c29c5d9daf (diff)
downloaddexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.gz
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.bz2
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.lz
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.xz
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.zst
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.zip
Merge branch 'development' into feature/instant/usd-eth-toggle
Diffstat (limited to 'packages/pipeline/migrations/1544131464368-CreateERC20ApprovalEvents.ts')
-rw-r--r--packages/pipeline/migrations/1544131464368-CreateERC20ApprovalEvents.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/packages/pipeline/migrations/1544131464368-CreateERC20ApprovalEvents.ts b/packages/pipeline/migrations/1544131464368-CreateERC20ApprovalEvents.ts
new file mode 100644
index 000000000..2e84e0ec8
--- /dev/null
+++ b/packages/pipeline/migrations/1544131464368-CreateERC20ApprovalEvents.ts
@@ -0,0 +1,26 @@
+import { MigrationInterface, QueryRunner, Table } from 'typeorm';
+
+const erc20ApprovalEvents = new Table({
+ name: 'raw.erc20_approval_events',
+ columns: [
+ { name: 'token_address', type: 'varchar(42)', isPrimary: true },
+ { name: 'log_index', type: 'integer', isPrimary: true },
+ { name: 'block_number', type: 'bigint', isPrimary: true },
+
+ { name: 'raw_data', type: 'varchar' },
+ { name: 'transaction_hash', type: 'varchar' },
+ { name: 'owner_address', type: 'varchar(42)' },
+ { name: 'spender_address', type: 'varchar(42)' },
+ { name: 'amount', type: 'numeric' },
+ ],
+});
+
+export class CreateERC20TokenApprovalEvents1544131464368 implements MigrationInterface {
+ public async up(queryRunner: QueryRunner): Promise<any> {
+ await queryRunner.createTable(erc20ApprovalEvents);
+ }
+
+ public async down(queryRunner: QueryRunner): Promise<any> {
+ await queryRunner.dropTable(erc20ApprovalEvents);
+ }
+}