storj/satellite/satellitedb
dlamarmorgan 2c0a360a14 satellite/satellitedb: migrate partner_id db column to user_agent db column
Value attribution codes were converted into UUIDs and stored in the users, projects, api_keys, bucket_metainfos, and value_attributions tables in the partner_id column. This migration will lookup the appropriate partner name associated with each of these UUIDs, and store the partner name directly in the user_agent column within each table. If an error occurs during the partner ID to partner name conversion, the partner ID value will be migrated to user_agent.

A note on the migration test data, postgres.v182.sql:
With one exception, all preexisting rows in the relevant tables had a NULL partner_ID. Therefore, we needed to insert new rows with partner_ID set under the OLD DATA section in order to test that the migration works. For each affected table, we insert one row with a valid partner ID which has a corresponding partner name, and one row with a partner ID which would return an error during the conversion to the partner name.

Change-Id: Iad977d72df0ce95a0c5ca80a065c4276ec1f2354
2021-11-24 22:43:22 +00:00
..
dbx satellite/metainfo: propagate geofencing between buckets and stream id 2021-11-24 08:05:05 +00:00
satellitedbtest satellite/metabase: limit maximum number of parts and size 2021-10-22 10:16:37 +00:00
testdata satellite/satellitedb: migrate partner_id db column to user_agent db column 2021-11-24 22:43:22 +00:00
apikeys.go satellite/{satellitedb,attribution,console}: value attribution changes that add userAgent field to buckets table and all tables that have partner_id 2021-10-18 13:56:19 +00:00
attribution.go satellite/{satellitedb,attribution,console}: value attribution changes that add userAgent field to buckets table and all tables that have partner_id 2021-10-18 13:56:19 +00:00
audithistory.go satellite/satellitedb: remove referrence to audit information in 2021-08-13 21:11:28 +00:00
bucketsdb.go satellite/metainfo: propagate geofencing between buckets and stream id 2021-11-24 08:05:05 +00:00
coinpaymentstxs.go satellite/satellitedb: fix ordering in listPendingTransitionShim 2021-10-25 19:33:53 +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 private/lrucache: import from common 2021-08-16 10:04:32 +00:00
containment.go satellite/satellitedb: remove references to contained column in nodes table 2021-10-14 19:17:46 +00:00
customers.go satellite/billing: make stripe invoice generation work with multiregion satellites 2021-05-06 11:51:03 -06:00
database.go satellite/buckets: add new buckets service 2021-11-16 12:36:17 +02:00
gracefulexit.go satellite/gracefulexit: drop unused column in graceful_exit_progress 2021-10-22 16:41:27 +00:00
invoiceprojectrecords.go satellite: use segment count for billing 2021-10-27 19:21:50 +00: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 satellite/{reputation/satellitedb}: remove references to contained column in reputations table 2021-10-14 19:59:03 +00:00
migrate.go satellite/satellitedb: migrate partner_id db column to user_agent db column 2021-11-24 22:43:22 +00:00
migratez.go satellite/satellitedb: migrate partner_id db column to user_agent db column 2021-11-24 22:43:22 +00:00
nodeapiversion.go ci: fix lint errors 2021-05-17 13:37:31 +00:00
nodeselection.go satellite/satellitedb: simplify select nodes query construction 2021-10-22 07:41:07 +00:00
orders.go satellite/orders: use egress_dead for calculating allocated bandwidth 2021-10-11 14:58:26 +02:00
overlaycache.go satellite/metainfo: propagate geofencing between buckets and stream id 2021-11-24 08:05:05 +00: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 satellite/{satellitedb, web}: display object count in satellite UI 2021-11-01 18:26:13 +00: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/{satellitedb,attribution,console}: value attribution changes that add userAgent field to buckets table and all tables that have partner_id 2021-10-18 13:56:19 +00:00
regtokens.go all: fix dots 2020-07-16 14:58:28 +00:00
repairqueue.go satellite/repair: migrate to new repair_queue table 2021-06-30 17:12:24 +02:00
reputations.go satellite/{reputation/satellitedb}: remove references to contained column in reputations table 2021-10-14 19:59:03 +00:00
resetpasstokens.go all: fix dots 2020-07-16 14:58:28 +00:00
revocation.go private/lrucache: import from common 2021-08-16 10:04:32 +00:00
storagenodeaccounting.go satellite/{metabase,satellitedb}: deduplicate AS OF SYSTEM TIME code 2021-05-11 12:40:36 +03:00
stripecoinpaymentsdb.go satellite/{payments,satellitedb}: Remove custom coupon implementation 2021-10-11 19:47:00 +00:00
users_test.go satellite/satellitedb/dbx: name the package dbx 2020-01-15 15:16:39 -07:00
users.go satellite/{console,satellitedb}: move project limits from config file to DB to keep limits on a per user basis 2021-11-11 15:10:00 +00:00