Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/orchestration migrations #100

Open
wants to merge 2 commits into
base: feat/merge-evm-eth
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class CreateDummyCompetitorsForCelo1643817555000 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
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<void> {
await queryRunner.dropTable('events_celo.competitor_swaps');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class CreateDummyCompetitorsForOptimism1643817586000 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
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<void> {
await queryRunner.dropTable('events_optimism.competitor_swaps');
}
}