Changes between Version 2 and Version 4 of Ticket #29588


Ignore:
Timestamp:
Jul 25, 2018, 3:53:06 PM (6 years ago)
Author:
Tim Graham
Comment:

Using that model, I see this migration:

# Generated by Django 2.0.8.dev20180716124449 on 2018-07-25 20:51

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Invoice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('field1', models.IntegerField()),
                ('field2', models.IntegerField()),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AlterUniqueTogether(
            name='invoice',
            unique_together={('field1', 'field2')},
        ),
    ]

If I've missed something, please be more explicit about the steps to reproduce the issue.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29588

    • Property Resolutionworksforme
    • Property Status newclosed
    • Property Summary Unique_together constraint not inherited from abstract model in migration fileunique_together constraint not inherited from abstract model in migration file
  • Ticket #29588 – Description

    v2 v4  
    77       field2 = models.IntegerField()
    88       class Meta:
    9        abstract = True
    10        unique_together = (('field1', 'field2'),)
     9           abstract = True
     10           unique_together = (('field1', 'field2'),)
    1111
    1212class Invoice(InvoicingDocument):
Back to Top