# Generated by Django 5.0a1 on 2023-10-17 12:48

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='DocumentIterator',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('prefix', models.CharField(editable=False, max_length=3, verbose_name='document prefix')),
                ('number', models.PositiveIntegerField(editable=False, verbose_name='document number (as integer)')),
                ('model', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='iterators', to='contenttypes.contenttype', verbose_name='document model')),
            ],
            options={
                'indexes': [models.Index(fields=['model', 'prefix'], name='ledgers_doc_model_i_bf0f1f_idx')],
            },
        ),
        migrations.AddConstraint(
            model_name='documentiterator',
            constraint=models.UniqueConstraint(fields=('model', 'prefix'), name='u_model_prefix'),
        ),
    ]
