feat/enterpriseportal: initialize subscriptions tables#63453
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @bobheadxi and the rest of your teammates on |
921ec91 to
ca3983b
Compare
ca3983b to
e11e559
Compare
There was a problem hiding this comment.
Happy to take ideas on how to represent this - GORM doesn't make it super easy to set up native enums, and maybe we don't want to use native enums anyway?
There was a problem hiding this comment.
I think using native enum would be a nice to have if low effort, otherwise, doesn't seem worth the trouble for now.
There was a problem hiding this comment.
From what I can tell, it's not possible, you can use an enum type but not make it
fdf7443 to
320b550
Compare
There was a problem hiding this comment.
I think using native enum would be a nice to have if low effort, otherwise, doesn't seem worth the trouble for now.
320b550 to
32bf1b3
Compare
c0c3741 to
8a5ca69
Compare
Closes https://linear.app/sourcegraph/issue/CORE-157 Potentially controversial decision: storing license data (the JSON data encoded into license keys, and the license key itself) in JSONB. The data in there isn't (and shouldn't be) interesting to query on - they're only used in the context of a single license, so you would never use it as conditions. The only one that might be useful is "license key substring" for parity with what we have today, but that's an internal-only use case and shouldn't be in the hotpath for anything super performance sensitive. Conditions table is similar to the one introduced in https://github.com/sourcegraph/sourcegraph/pull/63453 ## Test plan CI

The idea is to have a table of conditions which track reasons etc for major changes to a subscription. These aren't critical - important state still gets a subscription table time field for querying - but should match.
Closes https://linear.app/sourcegraph/issue/CORE-155
Test plan
Apply https://github.com/sourcegraph/sourcegraph/pull/63452, then
sg run enterprise-portal