Files
buzz/crates/buzz-push-gateway/migrations/0002_application_profiles.sql
Tom Brow d69b89c43c feat: add internal iOS push MVP
Signed-off-by: Tom Brow <tomb@squareup.com>
2026-08-18 16:23:53 -07:00

19 lines
866 B
SQL

-- The original profile names encoded APNs transport environment, not a
-- verified application identity. They therefore cannot be mapped safely to
-- either closed bundle profile. Retire the pre-profile demo authority and let
-- clients re-attest under the exact server-owned application profile.
DELETE FROM push_gateway_delegations
WHERE installation_id IN (
SELECT id FROM push_gateway_installations
WHERE app_profile IN ('buzz-ios-production', 'buzz-ios-sandbox')
);
DELETE FROM push_gateway_installations
WHERE app_profile IN ('buzz-ios-production', 'buzz-ios-sandbox');
ALTER TABLE push_gateway_installations
DROP CONSTRAINT push_gateway_installations_app_profile_check;
ALTER TABLE push_gateway_installations
ADD CONSTRAINT push_gateway_installations_app_profile_check
CHECK (app_profile IN ('buzz-ios-dogfood', 'buzz-ios-app-store'));