All checks were successful
CI/CD / go-lint (push) Has been skipped
CI/CD / python-lint (push) Has been skipped
CI/CD / nodejs-lint (push) Has been skipped
CI/CD / test-go-ai-compliance (push) Successful in 32s
CI/CD / test-python-backend-compliance (push) Successful in 33s
CI/CD / test-python-document-crawler (push) Successful in 21s
CI/CD / test-python-dsms-gateway (push) Successful in 17s
CI/CD / validate-canonical-controls (push) Successful in 12s
CI/CD / Deploy (push) Successful in 2s
Migrations 048 and 049 reference canonical_processed_chunks and canonical_controls tables which may not exist on all environments. Wrap ALTER TABLE statements in DO blocks that check for table existence first. This unblocks migrations 050-053 on production. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
872 B
SQL
23 lines
872 B
SQL
-- 048: Expand processing_path CHECK constraint for new pipeline paths
|
|
-- New values: prefilter_skip, no_control, store_failed, error
|
|
-- Safe: only runs if the table exists (may not exist on all environments)
|
|
|
|
DO $$
|
|
BEGIN
|
|
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'canonical_processed_chunks') THEN
|
|
ALTER TABLE canonical_processed_chunks
|
|
DROP CONSTRAINT IF EXISTS canonical_processed_chunks_processing_path_check;
|
|
ALTER TABLE canonical_processed_chunks
|
|
ADD CONSTRAINT canonical_processed_chunks_processing_path_check
|
|
CHECK (processing_path IN (
|
|
'structured',
|
|
'llm_reform',
|
|
'skipped',
|
|
'prefilter_skip',
|
|
'no_control',
|
|
'store_failed',
|
|
'error'
|
|
));
|
|
END IF;
|
|
END $$;
|