-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from paraswap/fix/delta-tracker-volume
fix: add staker column to tx snapshot, because with batched delta ord…
- Loading branch information
Showing
8 changed files
with
70 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,6 @@ logs.json | |
states.json | ||
|
||
|
||
scripts/gas-refund-program/*.csv | ||
scripts/gas-refund-program/*.csv | ||
|
||
.ignored |
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
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
29 changes: 29 additions & 0 deletions
29
sequelize/migrations/20241014000000-tx-snapshot-add-staker-column.js
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,29 @@ | ||
'use strict'; | ||
|
||
/** @type {import('sequelize-cli').Migration} */ | ||
|
||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
// queryInterface. | ||
await queryInterface.addColumn( | ||
'GasRefundTransactionStakeSnapshots', | ||
'staker', | ||
Sequelize.STRING(42), | ||
); | ||
|
||
// Drop the 'txChain_txHash_stakeChain' key if it exists -- the old constraint, without staker column. | ||
// the new one will be auto-created by modle | ||
await queryInterface.removeIndex( | ||
'GasRefundTransactionStakeSnapshots', | ||
'txChain_txHash_stakeChain', | ||
); | ||
}, | ||
|
||
async down(queryInterface) { | ||
queryInterface.removeColumn('GasRefundTransactionStakeSnapshots', 'staker'); | ||
await queryInterface.removeIndex( | ||
'GasRefundTransactionStakeSnapshots', | ||
'txChain_txHash_staker_stakeChain', | ||
); | ||
}, | ||
}; |
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
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
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
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