51 lines
2.5 KiB
Python
51 lines
2.5 KiB
Python
# Generated by Django 6.1.2 on 2026-10-20 12:20
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('projects', '0005_cardattachment'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='DocumentationSync',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('branch', models.CharField(blank=True, max_length=255)),
|
|
('indexed_repository_url', models.URLField(blank=True)),
|
|
('indexed_commit', models.CharField(blank=True, max_length=64)),
|
|
('remote_head', models.CharField(blank=True, max_length=64)),
|
|
('commit_time', models.DateTimeField(blank=True, null=True)),
|
|
('last_success_at', models.DateTimeField(blank=True, null=True)),
|
|
('last_attempt_at', models.DateTimeField(blank=True, null=True)),
|
|
('last_error', models.CharField(blank=True, max_length=300)),
|
|
('sync_token', models.CharField(blank=True, max_length=36)),
|
|
('sync_started_at', models.DateTimeField(blank=True, null=True)),
|
|
('audit_state', models.JSONField(blank=True, default=dict)),
|
|
('project', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='documentation_sync', to='projects.project')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='ProjectDocument',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('path', models.CharField(max_length=500)),
|
|
('title', models.CharField(max_length=255)),
|
|
('headings', models.JSONField(default=list)),
|
|
('markdown', models.TextField()),
|
|
('content_hash', models.CharField(max_length=64)),
|
|
('source_commit', models.CharField(max_length=64)),
|
|
('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='projects.project')),
|
|
],
|
|
options={
|
|
'ordering': ['path'],
|
|
'indexes': [models.Index(fields=['project', 'path'], name='projects_pr_project_424af7_idx')],
|
|
'constraints': [models.UniqueConstraint(fields=('project', 'path'), name='unique_project_document_path')],
|
|
},
|
|
),
|
|
]
|