-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split affiliate info fees by taker and maker (#2439)
- Loading branch information
1 parent
af18d0c
commit 12c2ee9
Showing
13 changed files
with
145 additions
and
60 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
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
25 changes: 25 additions & 0 deletions
25
...res/src/db/migrations/migration_files/20241002144813_change_affiliate_info_fee_columns.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,25 @@ | ||
import * as Knex from 'knex'; | ||
|
||
export async function up(knex: Knex): Promise<void> { | ||
return knex | ||
.schema | ||
.alterTable('affiliate_info', (table) => { | ||
table.dropColumn('totalReferredFees'); | ||
table.dropColumn('referredNetProtocolEarnings'); | ||
table.decimal('totalReferredTakerFees', null).notNullable().defaultTo(0); | ||
table.decimal('totalReferredMakerFees', null).notNullable().defaultTo(0); | ||
table.decimal('totalReferredMakerRebates', null).notNullable().defaultTo(0); | ||
}); | ||
} | ||
|
||
export async function down(knex: Knex): Promise<void> { | ||
return knex | ||
.schema | ||
.alterTable('affiliate_info', (table) => { | ||
table.decimal('totalReferredFees', null).notNullable().defaultTo(0); | ||
table.decimal('referredNetProtocolEarnings', null).notNullable().defaultTo(0); | ||
table.dropColumn('totalReferredTakerFees'); | ||
table.dropColumn('totalReferredMakerFees'); | ||
table.dropColumn('totalReferredMakerRebates'); | ||
}); | ||
} |
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
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
Oops, something went wrong.