Throw error if cannot find error in table
This commit is contained in:
@@ -24,6 +24,8 @@ export class TokenOrderBookSnapshotsAddMakerAddress1550163069315 implements Migr
|
||||
DROP CONSTRAINT "token_orderbook_snapshots_pkey1",
|
||||
ADD PRIMARY KEY (observed_timestamp, source, order_type, price, base_asset_symbol, quote_asset_symbol, maker_address);
|
||||
`);
|
||||
} else {
|
||||
throw new Error(`Could not find table with name ${TOKEN_ORDERBOOK_SNAPSHOT_TABLE}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +33,8 @@ export class TokenOrderBookSnapshotsAddMakerAddress1550163069315 implements Migr
|
||||
const snapshotTable = await queryRunner.getTable(TOKEN_ORDERBOOK_SNAPSHOT_TABLE);
|
||||
if (snapshotTable) {
|
||||
await queryRunner.dropColumn(snapshotTable, NEW_COLUMN_NAME);
|
||||
} else {
|
||||
throw new Error(`Could not find table with name ${TOKEN_ORDERBOOK_SNAPSHOT_TABLE}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user