diff --git a/event-pipeline-evm/migrations/celo/1643817555000-CreateDummyCompetitorsForCelo.ts b/event-pipeline-evm/migrations/celo/1643817555000-CreateDummyCompetitorsForCelo.ts new file mode 100644 index 00000000..0d61f360 --- /dev/null +++ b/event-pipeline-evm/migrations/celo/1643817555000-CreateDummyCompetitorsForCelo.ts @@ -0,0 +1,28 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class CreateDummyCompetitorsForCelo1643817555000 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(` + CREATE TABLE events_celo.competitor_swaps ( + competitor text, + observed_timestamp int8, + contract_address varchar, + transaction_hash varchar, + transaction_index int8, + log_index int8, + block_hash varchar, + block_number int8, + from_token varchar, + to_token varchar, + from_token_amount numeric, + to_token_amount numeric, + "from" varchar, + "to" varchar + ); + `); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.dropTable('events_celo.competitor_swaps'); + } +} diff --git a/event-pipeline-evm/migrations/optimism/1643817586000-CreateDummyCompetitorsForOptimism.ts b/event-pipeline-evm/migrations/optimism/1643817586000-CreateDummyCompetitorsForOptimism.ts new file mode 100644 index 00000000..de6857af --- /dev/null +++ b/event-pipeline-evm/migrations/optimism/1643817586000-CreateDummyCompetitorsForOptimism.ts @@ -0,0 +1,28 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class CreateDummyCompetitorsForOptimism1643817586000 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(` + CREATE TABLE events_optimism.competitor_swaps ( + competitor text, + observed_timestamp int8, + contract_address varchar, + transaction_hash varchar, + transaction_index int8, + log_index int8, + block_hash varchar, + block_number int8, + from_token varchar, + to_token varchar, + from_token_amount numeric, + to_token_amount numeric, + "from" varchar, + "to" varchar + ); + `); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.dropTable('events_optimism.competitor_swaps'); + } +}