storj/satellite/payments
paul cannon 294d253923 satellite/payments: chore to migrate big.Float values out of db
All code on known satellites at this moment in time should know how to
populate and use the new numeric columns on the
stripecoinpayments_tx_conversion_rates and coinpayments_transactions
tables in the satellite db. However, there are still gob-encoded
big.Float values in the database from before these columns existed. To
get rid of those values, so that we can excise the gob-decoding code
from the relevant sections, however, we need something to read the gob
bytestrings and convert them to numeric values, a few at a time, until
they're all gone.

To accomplish that, this change adds two chores to be run in the
satellite core process- one for the coinpayments_transactions table, and
one for the stripecoinpayments_tx_conversion_rates table. They should
run relatively infrequently, so that we do not impose any undue load on
processing resources or the db.

Both of these chores work without using explicit sql transactions, but
should still be concurrent-safe, since they work by way of
compare-and-swap type operations.

If the satellite core process needs to be restarted, both of these
chores will start scanning for migrateable rows from the beginning of
the id space again. This is not ideal, but shouldn't be a problem (as
far as I can tell, there are only a few thousand rows at most in either
of these tables on any production satellite).

Change-Id: I733b7cd96760d506a1cf52735f598c6c3aa19735
2022-02-16 23:48:30 +00:00
..
coinpayments satellite/payments: fix currency rates acquisition 2021-10-04 15:27:34 +00:00
monetary satellite/payments: specialized type for monetary amounts 2021-09-28 23:27:44 +00:00
paymentsconfig satellite: use segment count for billing 2021-10-27 19:21:50 +00:00
stripecoinpayments satellite/payments: chore to migrate big.Float values out of db 2022-02-16 23:48:30 +00:00
account.go satellite/{console,payments},web/satellite: save signup promo code to newly registered users 2022-01-21 15:02:22 +00:00
balance.go satellite: account balance divided into Free Credits and Coins 2020-05-18 14:25:26 +00:00
charges.go satellite/console: add credit card charges to billing history 2020-01-03 17:34:59 +02:00
coupons.go satellite/{console,payments},web/satellite: save signup promo code to newly registered users 2022-01-21 15:02:22 +00:00
creditcards.go satellite/{payments,admin}: add deletion of user creditcards on account deletion 2020-08-27 10:18:19 +00:00
credits.go all: switch to storj.io/common/uuid 2020-03-31 19:16:41 +03:00
invoices.go satellite/payments: Add old invoice list functionality 2021-10-18 18:18:18 -04:00
projectcharges.go satellite: use segment count for billing 2021-10-27 19:21:50 +00:00
tokens.go satellite/payments: specialized type for monetary amounts 2021-09-28 23:27:44 +00:00