storj/satellite/satellitedb
Jeff Wendling 1e065fb450 satellite: migration to fix bad imported payment history
the initial calculations for the historical values of comp_at_rest
were wrong. because our historical data only included total amounts
as well as compensation for bandwidth, the at rest value was
calculated as

    at_rest = total - bandwidth

unfortunately, that calculation did not take surge pricing into
account correctly. the at rest and bandwidth values do not
include surge pricing, but the total that was used did. so what
we actually calculated was

    no_surge_at_rest = surge_total - no_surge_bandwidth

which will create a value that is too large. this migration
fixes the calculation for imports that are old enough and
of a non-negligable difference.

Change-Id: I61eb0b670510f6d7fb8fc3de39ba79150fac10eb
2020-05-28 12:59:08 -06:00
..
dbx satellite/payments: all invoice commands require period 2020-05-14 11:50:19 +00:00
satellitedbtest all: rename CreateTables to MigrateToLatest 2020-04-30 07:21:17 +00:00
testdata satellite: migration to fix bad imported payment history 2020-05-28 12:59:08 -06:00
apikeys.go all: simplify uuid usage 2020-04-02 05:48:58 +00:00
attribution_test.go all: remove old uuid 2020-04-02 19:30:36 +03:00
attribution.go all: simplify uuid usage 2020-04-02 05:48:58 +00:00
buckets.go all: remove old uuid 2020-04-02 19:30:36 +03:00
coinpaymentstxs.go all: simplify uuid usage 2020-04-02 05:48:58 +00:00
compensation.go satellite/compensation: more fixes to get prod running smoothly 2020-04-07 10:10:27 +00:00
consoledb_test.go satellite/satellitedb/satellitedbtest: pass ctx as an argument 2020-01-20 16:35:42 +02:00
consoledb.go satellite/payments: fix promotional coupons 2020-01-29 16:40:43 +02:00
containment.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
coupons.go satellite/admin: add coupon deletion (#3893) 2020-05-19 15:49:44 +03:00
credits.go satellite/payments: all invoice commands require period 2020-05-14 11:50:19 +00:00
customers.go all: simplify uuid usage 2020-04-02 05:48:58 +00:00
database.go satellite: compensation package and commands 2020-03-30 14:08:14 -06:00
downtime.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
gracefulexit.go satellite/satellitedb: gracefulexit, add missing Errs check 2020-01-19 15:24:12 +00:00
heldamount.go storagenode/heldamount payments removed 2020-04-21 17:15:31 +00:00
invoiceprojectrecords.go satellite/payments/stripecoinpayments: test invoice user with more than 2020-05-27 09:12:23 +00:00
irreparabledb.go all: don't depend on gogo/proto directly 2020-04-08 17:32:15 +00:00
migrate_test.go satellite/satellitedb: add some docs and improve some snapshots 2020-05-22 21:27:36 +00:00
migrate.go satellite: migration to fix bad imported payment history 2020-05-28 12:59:08 -06:00
nodeselection.go satellite/satellitedb: use arrays for arguments in node selection 2020-04-09 21:16:10 +03:00
offers.go satellite: use tagsql 2020-01-19 14:39:16 +02:00
orders.go satellite/orders;accounting: Add monthly project download bandwidth rollup 2020-05-04 15:49:57 +00:00
overlaycache_test.go satellite/overlay: updates node with a vetted_at timestamp if they meet the vetting criteria 2020-05-20 16:30:26 -04:00
overlaycache.go satellite/overlay: updates node with a vetted_at timestamp if they meet the vetting criteria 2020-05-20 16:30:26 -04:00
peeridentities.go satellite: use tagsql 2020-01-19 14:39:16 +02:00
projectaccounting.go satellite/accounting: separate usage and bandwidth limit (#3878) 2020-05-12 15:01:15 +02:00
projectmembers_test.go web/satellite: project members sorting fixed (#3231) 2019-10-15 15:24:53 +03:00
projectmembers.go all: simplify uuid usage 2020-04-02 05:48:58 +00:00
projects_test.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
projects.go all: simplify uuid usage 2020-04-02 05:48:58 +00:00
regtokens.go all: simplify uuid usage 2020-04-02 05:48:58 +00:00
repairqueue.go satellite/repair/{checker,queue}: add metric for new segments added to repair queue 2020-05-27 06:23:47 +00:00
resetpasstokens.go all: simplify uuid usage 2020-04-02 05:48:58 +00:00
storagenodeaccounting.go satellite/satellitedb: do better ::date conversions 2020-05-13 15:58:07 +00:00
stripecoinpaymentsdb.go satellite/payments : deposit bonuses (credits) added 2020-02-11 11:11:42 +00:00
usercredits.go all: switch to storj.io/common/uuid 2020-03-31 19:16:41 +03:00
users_test.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
users.go all: simplify uuid usage 2020-04-02 05:48:58 +00:00
utils_test.go common: separate repository 2019-12-27 14:11:15 +02:00
utils.go all: simplify uuid usage 2020-04-02 05:48:58 +00:00