Files
openccb/services/cms-service/migrations/20260417000001_background_tasks_zip_rag.sql
T
Nurfog a3467d22d3 feat: Implement ZIP RAG import functionality with background processing
- Added support for ZIP RAG import in the asset management system.
- Introduced a new background task type for ZIP RAG imports.
- Enhanced the asset import process to allow for optional development processing.
- Updated the UI to reflect the new RAG processing status and options.
- Created database migration for background tasks related to ZIP RAG imports.
- Refactored asset handling to support FLV normalization and improved error handling.
- Added new API endpoints and updated existing ones to accommodate changes.
2026-04-17 12:51:50 -04:00

24 lines
867 B
SQL

CREATE TABLE IF NOT EXISTS background_tasks (
id UUID PRIMARY KEY,
organization_id UUID NOT NULL,
created_by UUID NOT NULL,
title TEXT NOT NULL,
course_title TEXT,
task_type VARCHAR(64) NOT NULL,
status VARCHAR(20) NOT NULL DEFAULT 'queued',
progress INTEGER NOT NULL DEFAULT 0,
total_items INTEGER NOT NULL DEFAULT 0,
processed_items INTEGER NOT NULL DEFAULT 0,
failed_items INTEGER NOT NULL DEFAULT 0,
error_message TEXT,
metadata JSONB NOT NULL DEFAULT '{}'::jsonb,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_background_tasks_org_status_updated
ON background_tasks (organization_id, status, updated_at DESC);
CREATE INDEX IF NOT EXISTS idx_background_tasks_type_status
ON background_tasks (task_type, status);