-- Hand-written, because drizzle-kit rewrites a CHECK by dropping and adding it
-- and will happily emit that with no IF EXISTS — which fails on any database
-- where the constraint was created under an earlier name.
--
-- Widening only: 'pig' is the self-hosted provider, whose external_id is a
-- media filename rather than a remote video id. Every value already stored
-- still satisfies the new list, so this needs no backfill and cannot fail on
-- existing rows.
--
-- The unique key on (track, provider, external_id) is untouched and is what
-- makes the self-hosted seed idempotent.
ALTER TABLE "learn_resources" DROP CONSTRAINT IF EXISTS "learn_resources_provider_check";--> statement-breakpoint
ALTER TABLE "learn_resources" ADD CONSTRAINT "learn_resources_provider_check" CHECK ("learn_resources"."provider" IN ('cap', 'loom', 'youtube_nocookie', 'pig'));
