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

feat(uptime): Add method, headers and body columns to UptimeSubscription #77611

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

wedamija
Copy link
Member

This adds columns that allow users to customize which method their checks are sent with, as well as custom headers and body.

…tion`

This adds columns that allow users to customize which method their checks are sent with, as well as custom headers and body.
@wedamija wedamija requested a review from a team as a code owner September 17, 2024 00:05
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 17, 2024
Copy link
Contributor

github-actions bot commented Sep 17, 2024

This PR has a migration; here is the generated SQL for src/sentry/uptime/migrations/0012_uptime_subscription_request_fields.py ()

--
-- Custom state/database change combination
--
ALTER TABLE "uptime_uptimesubscription" ADD COLUMN "body" text NULL;
ALTER TABLE "uptime_uptimesubscription" ADD COLUMN "headers" text DEFAULT '{}' NOT NULL;
ALTER TABLE "uptime_uptimesubscription" ADD COLUMN "method" varchar(20) DEFAULT 'GET' NOT NULL;

@wedamija
Copy link
Member Author

This PR has a migration; here is the generated SQL for src/sentry/uptime/migrations/0012_uptime_subscription_request_fields.py ()

--
-- Custom state/database change combination
--
ALTER TABLE "uptime_uptimesubscription" ADD COLUMN "body" text NULL;
ALTER TABLE "uptime_uptimesubscription" ADD COLUMN "headers" jsonb DEFAULT '{}'::jsonb NOT NULL;
ALTER TABLE "uptime_uptimesubscription" ADD COLUMN "method" varchar(20) DEFAULT 'GET' NOT NULL;

On second thought, I should use a text field so that we control how the json is serialized. I'm not sure we'll be guaranteed the ordering we provided

@wedamija wedamija merged commit 109de35 into master Sep 17, 2024
50 checks passed
@wedamija wedamija deleted the danf/uptime-subscription-request-fields branch September 17, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants