-- 012_bundled_source.sql — v0.3.8
-- Adds 'bundled' to the packages.source CHECK constraint for auto-installed packages.

ALTER TABLE packages DROP CONSTRAINT IF EXISTS packages_source_check;
ALTER TABLE packages ADD CONSTRAINT packages_source_check
    CHECK (source IN ('core', 'builtin', 'extension', 'registry', 'bundled'));
