storj/satellite
Moby von Briesen f536ee3aaf satellite/satellitedb: Migrate non-expiring coupons to expire
Because of recent changes to how coupons for the free tier are handled
(see commit 4c0817bcfb), we no longer want all these $10
non-expiring coupons. After coupons are applied during invoice
generation, if a customer does not have any valid (non expired, non
consumed) coupons, a new promotional coupon is applied.

We could just wait for users to consume all $10 of the non-expiring
coupons, and the new promotional coupon would be applied for the
following billing cycle, but this gets tricky, because if in the final
month, the user is billed for $1 of usage, but only $0.5 of the $10
non-expiring coupon is remaining, the user will be charged for the
remaining $0.5. With the new promotional coupon of $1.65, expiring every
month, this would not be an issue.

So long story short, this commit migrates all non-expiring coupons to
expire within 2 billing periods (all existing non-expiring coupons in
prod were created in early April or later). That way, there is still
enough value in the $10 coupon that we don't have to worry about
customers exceeding it, and the coupons will expire. Then we'll
immediately apply the $1.65 coupon for the next month! And then
hopefully this unfortunate situation will come to a pleasant end.

Change-Id: I8a593948d8876c41a71d886b9a95d4e2c802b4f3
2021-05-25 19:25:02 +00:00
..
accounting satellite/orders: use project daily bandwidth rollups 2021-05-25 18:28:58 +00:00
admin ci: fix lint errors 2021-05-17 13:37:31 +00:00
analytics satellite/analytics: Add analytics for "path selected" in onboarding step (#4086) 2021-04-19 09:44:25 -07:00
attribution all: golangci-lint v1.33.0 fixes (#3985) 2020-12-05 17:01:42 +01:00
audit satellite/metainfo: remove MetabaseDB interface 2021-05-13 13:22:14 +00:00
compensation satellite/compensation: add wallet features to invoice csv 2021-02-08 22:13:48 +02:00
console satellite/payments: Apply Stripe free tier coupon for new customers 2021-05-25 17:39:44 +00:00
contact satellite/contact: rate limit node checkins 2021-05-17 08:15:04 +00:00
gc mod: bump uplink 2021-05-06 14:48:36 +00:00
gracefulexit ci: fix lint errors 2021-05-17 13:37:31 +00:00
inspector satellite/metainfo: remove MetabaseDB interface 2021-05-13 13:22:14 +00:00
internalpb satellite/overlay: remove Inspector 2021-03-29 12:26:10 +03:00
mailservice satellite/mailservice: Fix bug causing issues with test account creation 2021-05-25 06:19:53 +00:00
metabase satellite/metabase: use pgxutil.Conn helper 2021-05-25 05:56:35 +00:00
metainfo satellite/metainfo: remove MetabaseDB interface 2021-05-13 13:22:14 +00:00
metrics all: fix error naming 2021-04-29 15:38:21 +03:00
nodeapiversion satellite/nodeapiversion: new table for tracking node api usage 2020-07-09 15:02:25 +00:00
nodeselection/uploadselection satellite/nodeselection/uploadselection: rename package 2021-05-04 15:50:00 +00:00
nodestats pb: use *UnimplementedServer to avoid breaking API changes 2021-03-29 12:26:10 +03:00
orders satellite/orders: populate 2021-05-25 18:07:22 +00:00
overlay ci: fix lint errors 2021-05-17 13:37:31 +00:00
payments satellite/payments: Apply Stripe free tier coupon for new customers 2021-05-25 17:39:44 +00:00
repair ci: fix lint errors 2021-05-17 13:37:31 +00:00
revocation satellite/satellitedb: move tests to their domains 2021-02-19 17:29:15 +02:00
rewards storj/storj: some domain changes we can make now 2021-04-13 17:12:06 +00:00
satellitedb satellite/satellitedb: Migrate non-expiring coupons to expire 2021-05-25 19:25:02 +00:00
snopayouts all: fix error naming 2021-04-29 15:38:21 +03:00
admin.go ci: fix lint errors 2021-05-17 13:37:31 +00:00
api.go ci: fix lint errors 2021-05-17 13:37:31 +00:00
configlock_test.go all: fix linter complaints 2020-10-13 15:59:01 +03:00
core.go ci: fix lint errors 2021-05-17 13:37:31 +00:00
gc.go ci: fix lint errors 2021-05-17 13:37:31 +00:00
peer.go pkg/,private/: merge with private package 2021-04-23 16:37:28 +03:00
repairer.go ci: fix lint errors 2021-05-17 13:37:31 +00:00