-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
549 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
migrations/arbitrum/1698670784000-CreateSocketBridgeEventTable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { MigrationInterface, QueryRunner, getConnection } from 'typeorm'; | ||
|
||
export class CreateSocketBridgeEventTable1698670784000 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(` | ||
CREATE TABLE ${schema}.socket_bridge_events ( | ||
observed_timestamp BIGINT NOT NULL, | ||
contract_address VARCHAR NOT NULL, | ||
transaction_hash VARCHAR NOT NULL, | ||
transaction_index BIGINT NOT NULL, | ||
log_index BIGINT NOT NULL, | ||
block_hash VARCHAR NOT NULL, | ||
block_number BIGINT NOT NULL, | ||
amount NUMERIC NOT NULL, | ||
token VARCHAR NOT NULL, | ||
to_chain_id NUMERIC NOT NULL, | ||
bridge_name VARCHAR NOT NULL, | ||
sender VARCHAR NOT NULL, | ||
receiver VARCHAR NOT NULL, | ||
metadata VARCHAR NOT NULL, | ||
PRIMARY KEY (transaction_hash, log_index) | ||
); | ||
CREATE INDEX socket_bridge_events_block_number_idx ON ${schema}.socket_bridge_events (block_number); | ||
CREATE INDEX socket_bridge_events_sender_idx ON ${schema}.socket_bridge_events (sender); | ||
`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(`DROP TABLE ${schema}.socket_bridge_events;`); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
migrations/avalanche/1698670784000-CreateSocketBridgeEventTable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { MigrationInterface, QueryRunner, getConnection } from 'typeorm'; | ||
|
||
export class CreateSocketBridgeEventTable1698670784000 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(` | ||
CREATE TABLE ${schema}.socket_bridge_events ( | ||
observed_timestamp BIGINT NOT NULL, | ||
contract_address VARCHAR NOT NULL, | ||
transaction_hash VARCHAR NOT NULL, | ||
transaction_index BIGINT NOT NULL, | ||
log_index BIGINT NOT NULL, | ||
block_hash VARCHAR NOT NULL, | ||
block_number BIGINT NOT NULL, | ||
amount NUMERIC NOT NULL, | ||
token VARCHAR NOT NULL, | ||
to_chain_id NUMERIC NOT NULL, | ||
bridge_name VARCHAR NOT NULL, | ||
sender VARCHAR NOT NULL, | ||
receiver VARCHAR NOT NULL, | ||
metadata VARCHAR NOT NULL, | ||
PRIMARY KEY (transaction_hash, log_index) | ||
); | ||
CREATE INDEX socket_bridge_events_block_number_idx ON ${schema}.socket_bridge_events (block_number); | ||
CREATE INDEX socket_bridge_events_sender_idx ON ${schema}.socket_bridge_events (sender); | ||
`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(`DROP TABLE ${schema}.socket_bridge_events;`); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
migrations/base/1698670784000-CreateSocketBridgeEventTable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { MigrationInterface, QueryRunner, getConnection } from 'typeorm'; | ||
|
||
export class CreateSocketBridgeEventTable1698670784000 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(` | ||
CREATE TABLE ${schema}.socket_bridge_events ( | ||
observed_timestamp BIGINT NOT NULL, | ||
contract_address VARCHAR NOT NULL, | ||
transaction_hash VARCHAR NOT NULL, | ||
transaction_index BIGINT NOT NULL, | ||
log_index BIGINT NOT NULL, | ||
block_hash VARCHAR NOT NULL, | ||
block_number BIGINT NOT NULL, | ||
amount NUMERIC NOT NULL, | ||
token VARCHAR NOT NULL, | ||
to_chain_id NUMERIC NOT NULL, | ||
bridge_name VARCHAR NOT NULL, | ||
sender VARCHAR NOT NULL, | ||
receiver VARCHAR NOT NULL, | ||
metadata VARCHAR NOT NULL, | ||
PRIMARY KEY (transaction_hash, log_index) | ||
); | ||
CREATE INDEX socket_bridge_events_block_number_idx ON ${schema}.socket_bridge_events (block_number); | ||
CREATE INDEX socket_bridge_events_sender_idx ON ${schema}.socket_bridge_events (sender); | ||
`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(`DROP TABLE ${schema}.socket_bridge_events;`); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
migrations/bsc/1698670784000-CreateSocketBridgeEventTable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { MigrationInterface, QueryRunner, getConnection } from 'typeorm'; | ||
|
||
export class CreateSocketBridgeEventTable1698670784000 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(` | ||
CREATE TABLE ${schema}.socket_bridge_events ( | ||
observed_timestamp BIGINT NOT NULL, | ||
contract_address VARCHAR NOT NULL, | ||
transaction_hash VARCHAR NOT NULL, | ||
transaction_index BIGINT NOT NULL, | ||
log_index BIGINT NOT NULL, | ||
block_hash VARCHAR NOT NULL, | ||
block_number BIGINT NOT NULL, | ||
amount NUMERIC NOT NULL, | ||
token VARCHAR NOT NULL, | ||
to_chain_id NUMERIC NOT NULL, | ||
bridge_name VARCHAR NOT NULL, | ||
sender VARCHAR NOT NULL, | ||
receiver VARCHAR NOT NULL, | ||
metadata VARCHAR NOT NULL, | ||
PRIMARY KEY (transaction_hash, log_index) | ||
); | ||
CREATE INDEX socket_bridge_events_block_number_idx ON ${schema}.socket_bridge_events (block_number); | ||
CREATE INDEX socket_bridge_events_sender_idx ON ${schema}.socket_bridge_events (sender); | ||
`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(`DROP TABLE ${schema}.socket_bridge_events;`); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
migrations/celo/1698670784000-CreateSocketBridgeEventTable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { MigrationInterface, QueryRunner, getConnection } from 'typeorm'; | ||
|
||
export class CreateSocketBridgeEventTable1698670784000 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(` | ||
CREATE TABLE ${schema}.socket_bridge_events ( | ||
observed_timestamp BIGINT NOT NULL, | ||
contract_address VARCHAR NOT NULL, | ||
transaction_hash VARCHAR NOT NULL, | ||
transaction_index BIGINT NOT NULL, | ||
log_index BIGINT NOT NULL, | ||
block_hash VARCHAR NOT NULL, | ||
block_number BIGINT NOT NULL, | ||
amount NUMERIC NOT NULL, | ||
token VARCHAR NOT NULL, | ||
to_chain_id NUMERIC NOT NULL, | ||
bridge_name VARCHAR NOT NULL, | ||
sender VARCHAR NOT NULL, | ||
receiver VARCHAR NOT NULL, | ||
metadata VARCHAR NOT NULL, | ||
PRIMARY KEY (transaction_hash, log_index) | ||
); | ||
CREATE INDEX socket_bridge_events_block_number_idx ON ${schema}.socket_bridge_events (block_number); | ||
CREATE INDEX socket_bridge_events_sender_idx ON ${schema}.socket_bridge_events (sender); | ||
`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(`DROP TABLE ${schema}.socket_bridge_events;`); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
migrations/ethereum/1698670784000-CreateSocketBridgeEventTable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { MigrationInterface, QueryRunner, getConnection } from 'typeorm'; | ||
|
||
export class CreateSocketBridgeEventTable1698670784000 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(` | ||
CREATE TABLE ${schema}.socket_bridge_events ( | ||
observed_timestamp BIGINT NOT NULL, | ||
contract_address VARCHAR NOT NULL, | ||
transaction_hash VARCHAR NOT NULL, | ||
transaction_index BIGINT NOT NULL, | ||
log_index BIGINT NOT NULL, | ||
block_hash VARCHAR NOT NULL, | ||
block_number BIGINT NOT NULL, | ||
amount NUMERIC NOT NULL, | ||
token VARCHAR NOT NULL, | ||
to_chain_id NUMERIC NOT NULL, | ||
bridge_name VARCHAR NOT NULL, | ||
sender VARCHAR NOT NULL, | ||
receiver VARCHAR NOT NULL, | ||
metadata VARCHAR NOT NULL, | ||
PRIMARY KEY (transaction_hash, log_index) | ||
); | ||
CREATE INDEX socket_bridge_events_block_number_idx ON ${schema}.socket_bridge_events (block_number); | ||
CREATE INDEX socket_bridge_events_sender_idx ON ${schema}.socket_bridge_events (sender); | ||
`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(`DROP TABLE ${schema}.socket_bridge_events;`); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
migrations/fantom/1698670784000-CreateSocketBridgeEventTable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { MigrationInterface, QueryRunner, getConnection } from 'typeorm'; | ||
|
||
export class CreateSocketBridgeEventTable1698670784000 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(` | ||
CREATE TABLE ${schema}.socket_bridge_events ( | ||
observed_timestamp BIGINT NOT NULL, | ||
contract_address VARCHAR NOT NULL, | ||
transaction_hash VARCHAR NOT NULL, | ||
transaction_index BIGINT NOT NULL, | ||
log_index BIGINT NOT NULL, | ||
block_hash VARCHAR NOT NULL, | ||
block_number BIGINT NOT NULL, | ||
amount NUMERIC NOT NULL, | ||
token VARCHAR NOT NULL, | ||
to_chain_id NUMERIC NOT NULL, | ||
bridge_name VARCHAR NOT NULL, | ||
sender VARCHAR NOT NULL, | ||
receiver VARCHAR NOT NULL, | ||
metadata VARCHAR NOT NULL, | ||
PRIMARY KEY (transaction_hash, log_index) | ||
); | ||
CREATE INDEX socket_bridge_events_block_number_idx ON ${schema}.socket_bridge_events (block_number); | ||
CREATE INDEX socket_bridge_events_sender_idx ON ${schema}.socket_bridge_events (sender); | ||
`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(`DROP TABLE ${schema}.socket_bridge_events;`); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
migrations/optimism/1698670784000-CreateSocketBridgeEventTable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { MigrationInterface, QueryRunner, getConnection } from 'typeorm'; | ||
|
||
export class CreateSocketBridgeEventTable1698670784000 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(` | ||
CREATE TABLE ${schema}.socket_bridge_events ( | ||
observed_timestamp BIGINT NOT NULL, | ||
contract_address VARCHAR NOT NULL, | ||
transaction_hash VARCHAR NOT NULL, | ||
transaction_index BIGINT NOT NULL, | ||
log_index BIGINT NOT NULL, | ||
block_hash VARCHAR NOT NULL, | ||
block_number BIGINT NOT NULL, | ||
amount NUMERIC NOT NULL, | ||
token VARCHAR NOT NULL, | ||
to_chain_id NUMERIC NOT NULL, | ||
bridge_name VARCHAR NOT NULL, | ||
sender VARCHAR NOT NULL, | ||
receiver VARCHAR NOT NULL, | ||
metadata VARCHAR NOT NULL, | ||
PRIMARY KEY (transaction_hash, log_index) | ||
); | ||
CREATE INDEX socket_bridge_events_block_number_idx ON ${schema}.socket_bridge_events (block_number); | ||
CREATE INDEX socket_bridge_events_sender_idx ON ${schema}.socket_bridge_events (sender); | ||
`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(`DROP TABLE ${schema}.socket_bridge_events;`); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
migrations/polygon/1698670784000-CreateSocketBridgeEventTable.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { MigrationInterface, QueryRunner, getConnection } from 'typeorm'; | ||
|
||
export class CreateSocketBridgeEventTable1698670784000 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(` | ||
CREATE TABLE ${schema}.socket_bridge_events ( | ||
observed_timestamp BIGINT NOT NULL, | ||
contract_address VARCHAR NOT NULL, | ||
transaction_hash VARCHAR NOT NULL, | ||
transaction_index BIGINT NOT NULL, | ||
log_index BIGINT NOT NULL, | ||
block_hash VARCHAR NOT NULL, | ||
block_number BIGINT NOT NULL, | ||
amount NUMERIC NOT NULL, | ||
token VARCHAR NOT NULL, | ||
to_chain_id NUMERIC NOT NULL, | ||
bridge_name VARCHAR NOT NULL, | ||
sender VARCHAR NOT NULL, | ||
receiver VARCHAR NOT NULL, | ||
metadata VARCHAR NOT NULL, | ||
PRIMARY KEY (transaction_hash, log_index) | ||
); | ||
CREATE INDEX socket_bridge_events_block_number_idx ON ${schema}.socket_bridge_events (block_number); | ||
CREATE INDEX socket_bridge_events_sender_idx ON ${schema}.socket_bridge_events (sender); | ||
`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
const connection = getConnection(); | ||
const { schema } = connection.options as any; | ||
await queryRunner.query(`DROP TABLE ${schema}.socket_bridge_events;`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.