migration: normalize license key fields and record subscription account number
Created by: unknwon
We want to use Polytomic to pull license data from our Postgres to Salesforce, but we currently only store the encoded license key which then requires on-the-fly decoding during the data transmission that can not be easily supported (only SQL is allowed, and for some reasons we used base64.RawURLEncoding.EncodeString
which doesn't have padding that the Postgres base64 decoder would expect).
This PR adds columns needed to normalize the license tags, user count and expiration date as dedicated columns to be populated later (update the write path + OOB migration).
We currently also optionally include a Salesforce account number in the user name (e.g. XYZ-11223344
) that a product subscription is associated with (as a hack, due to lack of this column), thus adding the product_subscriptions.account_number
column as well.
Test plan
CI
Part of https://github.com/sourcegraph/sourcegraph/issues/38661