Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

feat/enterpriseportal: use UUID type for subscription ID#63452

Merged
bobheadxi merged 1 commit into
mainfrom
ep-subscriptions-uuid
Jun 25, 2024
Merged

feat/enterpriseportal: use UUID type for subscription ID#63452
bobheadxi merged 1 commit into
mainfrom
ep-subscriptions-uuid

Conversation

@bobheadxi

@bobheadxi bobheadxi commented Jun 24, 2024

Copy link
Copy Markdown
Member

We were aligned on using non-prefixed UUIDs internally, only prefixing them for external consumption. This lets us use the native UUID type.

Part of https://linear.app/sourcegraph/issue/CORE-155

Test plan

CI, sg run enterprise-portal

select * from enterprise_portal_subscriptions; on dev shows we are using the non-prefixed UUDs only. Manual migration, since it doesn't seem like GORM can do this for you:

ALTER TABLE enterprise_portal_subscriptions ALTER COLUMN id TYPE uuid USING id::uuid;

Checked that data is intact.

@bobheadxi bobheadxi requested review from a team and unknwon June 24, 2024 21:56
@cla-bot cla-bot Bot added the cla-signed label Jun 24, 2024
@bobheadxi bobheadxi marked this pull request as ready for review June 24, 2024 21:56

bobheadxi commented Jun 24, 2024

Copy link
Copy Markdown
Member Author

@unknwon

unknwon commented Jun 25, 2024

Copy link
Copy Markdown
Contributor

it doesn't seem like GORM can do this for you

For safety reason, it only adds addition or compatible/broader type changes

@bobheadxi bobheadxi merged commit e9a31ea into main Jun 25, 2024
@bobheadxi bobheadxi deleted the ep-subscriptions-uuid branch June 25, 2024 00:39
bobheadxi referenced this pull request Jun 27, 2024
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`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants