-- 53_add_is_generic_to_db.sql
-- Add public.entities.is_generic BOOLEAN. Populated by 54_sync_is_generic.py
-- which reads each YAML's is_generic and writes it to the DB.

BEGIN;
ALTER TABLE public.entities
  ADD COLUMN IF NOT EXISTS is_generic BOOLEAN NOT NULL DEFAULT FALSE;
CREATE INDEX IF NOT EXISTS entities_is_generic_idx
  ON public.entities (is_generic) WHERE is_generic = TRUE;
COMMIT;
