remaining stage 1

This commit is contained in:
alorig
2025-11-19 20:53:29 +05:00
parent b5cc262f04
commit 4ca85ae0e5
4 changed files with 86 additions and 32 deletions

View File

@@ -2,6 +2,28 @@ from django.db import migrations, models
import django.db.models.deletion
def backfill_metadata_mappings_stub(apps, schema_editor):
"""
Stage 1: Placeholder for Stage 3 metadata backfill.
This function will be extended in Stage 3 to backfill:
- ContentClusterMap records from existing Content/Task -> Cluster relationships
- ContentTaxonomyMap records from existing taxonomy associations
- ContentAttributeMap records from existing attribute data
For now, this is a no-op to establish the migration hook.
"""
# Stage 1: No-op - tables created, ready for Stage 3 backfill
pass
def reverse_backfill_metadata_mappings_stub(apps, schema_editor):
"""
Reverse operation for metadata backfill (no-op for Stage 1).
"""
pass
class Migration(migrations.Migration):
dependencies = [
@@ -117,5 +139,10 @@ class Migration(migrations.Migration):
model_name='contentattributemap',
index=models.Index(fields=['task', 'name'], name='writer_con_task__name_fa4a4e_idx'),
),
# Stage 1: Data migration stub for Stage 3 backfill
migrations.RunPython(
backfill_metadata_mappings_stub,
reverse_backfill_metadata_mappings_stub,
),
]