Files
geo/server/migrations_ops/20260505101000_seed_compliance_dictionaries.down.sql
T
root 745cdd79cf feat(compliance): add content compliance detection across tenant, ops, and clients
Implements the Revision 8/9 compliance design: tenant + ops backends, ops-web
content-safety pages, admin-web editor/publish gate integration, desktop publish
block surfacing, and supporting migrations / shared types / config plumbing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 20:48:14 +08:00

23 lines
744 B
SQL

DELETE FROM ops.compliance_dictionary_versions
WHERE dictionary_id IN (
SELECT id
FROM ops.compliance_dictionaries
WHERE code IN ('ad_law_extreme', 'political_sensitive', 'violence_pornography', 'generic_prohibited')
);
DELETE FROM ops.compliance_dictionary_terms
WHERE dictionary_id IN (
SELECT id
FROM ops.compliance_dictionaries
WHERE code IN ('ad_law_extreme', 'political_sensitive', 'violence_pornography', 'generic_prohibited')
);
DELETE FROM ops.compliance_dictionaries
WHERE code IN ('ad_law_extreme', 'political_sensitive', 'violence_pornography', 'generic_prohibited');
UPDATE ops.compliance_policies
SET enabled_dictionaries = '[]'::jsonb,
revision = revision + 1,
updated_at = NOW()
WHERE id = 1;