Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(logo-upload): Migrate SentryApp table to include popularity column #29955

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

leeandher
Copy link
Member

@leeandher leeandher commented Nov 11, 2021

See API-2249

This PR will add the popularity column to the SentryApp table with a type of PositiveSmallInteger. The default value is 1 since that will be the lowest ranking when compared to the current hardcoded values.

@leeandher
Copy link
Member Author

i dont know if the GH bot edits its first message but i changed the migration, here is the new sql

BEGIN;
--
-- Custom state/database change combination
--
ALTER TABLE "sentry_sentryapp" ADD COLUMN "popularity" smallint NULL CHECK ("popularity" >= 0);
COMMIT;

@github-actions
Copy link
Contributor

This PR has a migration; here is the generated SQL

BEGIN;
--
-- Custom state/database change combination
--
ALTER TABLE "sentry_sentryapp" ADD COLUMN "popularity" smallint NULL CHECK ("popularity" >= 0);
COMMIT;

@leeandher
Copy link
Member Author

gh bot is smart

@leeandher leeandher marked this pull request as ready for review November 11, 2021 19:29
@leeandher leeandher requested a review from a team as a code owner November 11, 2021 19:29
@leeandher leeandher requested a review from a team November 11, 2021 19:29
@leeandher leeandher requested a review from a team as a code owner November 11, 2021 19:29
Copy link
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, thanks for updating the docs!

How will popularity be used? Any chance we will overflow a small int at some point?

@ceorourke
Copy link
Member

@wedamija popularity is currently housed here https://github.com/getsentry/sentry/blob/master/static/app/views/organizationIntegrations/constants.tsx#L37 and will be replaced - the highest rn is 50 for slack and all published sentryapps are 9 so we're good

@leeandher leeandher merged commit 8b8868a into master Nov 11, 2021
@leeandher leeandher deleted the leander-migrate-pop/API-2249 branch November 11, 2021 19:50
@github-actions github-actions bot locked and limited conversation to collaborators Nov 27, 2021
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.

3 participants