feat: Implement SAM structure mirroring in PostgreSQL for study plans and courses

- Added functionality to save study plans and courses in SAM format to PostgreSQL.
- Updated SQL queries to reflect SAM-native column names and handle conflicts appropriately.
- Introduced new fields in the Asset model for English level and SAM identifiers.
- Enhanced the TestTemplateForm component to manage linked assets and shared materials.
- Created a new AdminSharedMaterialsPage for uploading ZIP files of shared materials.
- Added migrations to create SAM mirror tables and update the assets table with new columns.
This commit is contained in:
2026-04-06 17:04:36 -04:00
parent eea456cd95
commit 7f9b9d69ae
12 changed files with 795 additions and 59 deletions
@@ -0,0 +1,6 @@
ALTER TABLE assets
ADD COLUMN IF NOT EXISTS sam_plan_id INTEGER,
ADD COLUMN IF NOT EXISTS sam_course_id INTEGER;
CREATE INDEX IF NOT EXISTS idx_assets_org_sam_plan_course
ON assets (organization_id, sam_plan_id, sam_course_id);