storj/satellite/satellitedb
Moby von Briesen 4c0817bcfb satellite/payments: Populate new coupons during invoice generation
The previously configured never-expiring coupon does not refill every
month. Eventually, even though it never expires, it will run out. This
commit makes several small changes to address this issue for the free
tier:
* Change the config for the promotional coupon to be $1.65 for 1 month
(the change from $10 to $1.65 is due to our recent pricing changes)
* Update PopulatePromotionalCoupons (PPC for brevity) to add promotional
coupons to users with expired and consumed coupons (all users with a
project and no active coupons should get a new coupon when PPC is called)
* Call PPC at the end of the `create-invoice-coupons` stage of invoice
generation - after current coupons are processed and expired/exhausted.
* Remove legacy admin functionality for PPC from satellite/console - we
do not currently use it, but if we did, it should be in satellite/admin
instead.

Change-Id: I77727b97bef972df32ebb23cdc05055827076e2a
2021-04-28 18:07:05 +00:00
..
dbx satellite/satellitedb: add have_sales_contact column on users 2021-04-26 13:37:26 +00:00
satellitedbtest private/dbutil: use dbutil and tagsql from storj.io/private 2021-04-23 14:36:52 +03:00
testdata satellite/satellitedb: add have_sales_contact column on users 2021-04-26 13:37:26 +00:00
apikeys.go pkg/,private/: merge with private package 2021-04-23 16:37:28 +03:00
attribution.go satellite/metainfo: avoid error on inserting existing attribution 2021-04-02 08:18:17 +00:00
audithistory.go satellite/{overlay, satellitedb}: Refactor audit history 2020-12-29 18:50:22 +00:00
bucketsdb.go satellite/metabase: move package one level higher 2021-04-21 15:54:22 +03:00
coinpaymentstxs.go satellite/satellitedb: Coinpayments repeat insert bug fix 2020-07-20 20:21:35 +00:00
compensation.go satellite/compensation: smaller txns for RecordPeriod 2021-03-02 20:14:25 +00:00
consoledb_test.go satellite/satellitedb/satellitedbtest: pass ctx as an argument 2020-01-20 16:35:42 +02:00
consoledb.go pkg/,private/: merge with private package 2021-04-23 16:37:28 +03:00
containment.go satellite/metabase: move package one level higher 2021-04-21 15:54:22 +03:00
coupons.go satellite/payments: Populate new coupons during invoice generation 2021-04-28 18:07:05 +00:00
customers.go all: replace == comparison with errors.Is 2020-07-14 15:50:25 +00:00
database.go pkg/,private/: merge with private package 2021-04-23 16:37:28 +03:00
gracefulexit.go private/dbutil: use dbutil and tagsql from storj.io/private 2021-04-23 14:36:52 +03:00
invoiceprojectrecords.go satellite/payments: delete credits and credits_spendings db tables 2020-07-30 12:19:57 +03:00
irreparabledb.go satellite/metabase: move package one level higher 2021-04-21 15:54:22 +03:00
migrate_gen.go private/dbutil: use dbutil and tagsql from storj.io/private 2021-04-23 14:36:52 +03:00
migrate_test.go private/dbutil: use dbutil and tagsql from storj.io/private 2021-04-23 14:36:52 +03:00
migrate.go satellite/satellitedb: add have_sales_contact column on users 2021-04-26 13:37:26 +00:00
migratez.go satellite/satellitedb: add have_sales_contact column on users 2021-04-26 13:37:26 +00:00
nodeapiversion.go all: use jackc/pgx in place of lib/pq 2020-07-13 15:54:41 +00:00
nodeselection.go private/dbutil: use dbutil and tagsql from storj.io/private 2021-04-23 14:36:52 +03:00
orders.go private/dbutil: use dbutil and tagsql from storj.io/private 2021-04-23 14:36:52 +03:00
overlaycache.go private/dbutil: use dbutil and tagsql from storj.io/private 2021-04-23 14:36:52 +03:00
payouts.go satellite/compensation: smaller txns for RecordPeriod 2021-03-02 20:14:25 +00:00
peeridentities.go all: fix dots 2020-07-16 14:58:28 +00:00
projectaccounting.go private/dbutil: use dbutil and tagsql from storj.io/private 2021-04-23 14:36:52 +03:00
projectmembers_test.go web/satellite: project members sorting fixed (#3231) 2019-10-15 15:24:53 +03:00
projectmembers.go all: fix linter complaints 2020-10-13 15:59:01 +03:00
projects_test.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
projects.go satellite/console: change default project and usage limits 2021-03-24 14:24:27 +00:00
regtokens.go all: fix dots 2020-07-16 14:58:28 +00:00
repairqueue.go private/dbutil: use dbutil and tagsql from storj.io/private 2021-04-23 14:36:52 +03:00
resetpasstokens.go all: fix dots 2020-07-16 14:58:28 +00:00
revocation.go pkg/,private/: merge with private package 2021-04-23 16:37:28 +03:00
storagenodeaccounting.go private/dbutil: use dbutil and tagsql from storj.io/private 2021-04-23 14:36:52 +03:00
stripecoinpaymentsdb.go satellite/payments: delete credits and credits_spendings db tables 2020-07-30 12:19:57 +03:00
users_test.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
users.go satellite/satellitedb: add employee size column to users 2021-02-12 09:15:15 -05:00