# Generated by Django 5.1.4 on 2024-12-17 19:59

import django.db.models.deletion
import django_extensions.db.fields
import sphinx_hosting.models
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('sphinxhostingcore', '0017_alter_sphinxpage_body_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='SphinxDocument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
                ('orig_path', models.CharField(help_text='The original path to this file in the Sphinx documentation package', max_length=256, verbose_name='Original Path')),
                ('file', models.FileField(help_text='The actual document file', upload_to=sphinx_hosting.models.sphinx_document_upload_to, verbose_name='An image file')),
                ('version', models.ForeignKey(help_text='The version of our project documentation with which this document is associated', on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='sphinxhostingcore.version')),
            ],
            options={
                'verbose_name': 'sphinx document',
                'verbose_name_plural': 'sphinx documents',
                'unique_together': {('version', 'orig_path')},
            },
        ),
    ]
