|
|
@@ -1,6 +1,8 @@
|
|
|
-# Generated by Django 4.2.29 on 2026-03-05 11:58
|
|
|
+# Generated by Django 4.2.29 on 2026-05-19 12:23
|
|
|
|
|
|
+from django.conf import settings
|
|
|
from django.db import migrations, models
|
|
|
+import django.db.models.deletion
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
@@ -8,6 +10,7 @@ class Migration(migrations.Migration):
|
|
|
initial = True
|
|
|
|
|
|
dependencies = [
|
|
|
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
]
|
|
|
|
|
|
operations = [
|
|
|
@@ -16,10 +19,24 @@ class Migration(migrations.Migration):
|
|
|
fields=[
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
('title', models.CharField(max_length=255)),
|
|
|
- ('introduction', models.TextField(help_text='The introductory section of the document.')),
|
|
|
- ('main_body', models.TextField(help_text='The main content or analysis.')),
|
|
|
- ('conclusion', models.TextField(help_text='The concluding remarks or summary.')),
|
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
|
+ ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
|
],
|
|
|
),
|
|
|
+ migrations.CreateModel(
|
|
|
+ name='DocumentVersion',
|
|
|
+ fields=[
|
|
|
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
+ ('version_number', models.PositiveIntegerField()),
|
|
|
+ ('introduction', models.TextField()),
|
|
|
+ ('main_body', models.TextField()),
|
|
|
+ ('conclusion', models.TextField()),
|
|
|
+ ('created_at', models.DateTimeField(auto_now_add=True)),
|
|
|
+ ('document', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='versions', to='textdocs.document')),
|
|
|
+ ],
|
|
|
+ options={
|
|
|
+ 'ordering': ['-version_number'],
|
|
|
+ 'unique_together': {('document', 'version_number')},
|
|
|
+ },
|
|
|
+ ),
|
|
|
]
|