alter table public.tenant_content_notifications drop constraint if exists tenant_content_notifications_notification_type_check; alter table public.tenant_content_notifications add constraint tenant_content_notifications_notification_type_check check (notification_type in ( 'public_question_bank_synced', 'public_question_bank_conflict', 'public_question_bank_sync_failed' )); create index if not exists idx_tenant_question_bank_adoptions_sync_ops on public.tenant_question_bank_adoptions(sync_status, updated_at desc) where sync_status in ('pending', 'failed');