-
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.
[OTE-762] replace comlink affiliate snapshot endpoint stub with real …
…logic
- Loading branch information
1 parent
9c38c1e
commit 3cb2978
Showing
15 changed files
with
537 additions
and
73 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
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
22 changes: 22 additions & 0 deletions
22
...s/20240913142157_change_affiliate_info_decimal_precision_and_add_total_referred_volume.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,22 @@ | ||
import * as Knex from 'knex'; | ||
|
||
export async function up(knex: Knex): Promise<void> { | ||
return knex.schema.alterTable('affiliate_info', (table) => { | ||
// null indicates variable precision whereas not specifying will result in 8,2 precision,scale | ||
table.decimal('affiliateEarnings', null).alter(); | ||
table.decimal('totalReferredFees', null).alter(); | ||
table.decimal('referredNetProtocolEarnings', null).alter(); | ||
|
||
table.decimal('referredTotalVolume', null).notNullable(); | ||
}); | ||
} | ||
|
||
export async function down(knex: Knex): Promise<void> { | ||
return knex.schema.alterTable('affiliate_info', (table) => { | ||
table.decimal('affiliateEarnings').alter(); | ||
table.decimal('totalReferredFees').alter(); | ||
table.decimal('referredNetProtocolEarnings').alter(); | ||
|
||
table.dropColumn('referredTotalVolume'); | ||
}); | ||
} |
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.