# Generated by Django 4.2.29 on 2026-04-28 02:59

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('finance', '0002_payment_unique_payment_per_invoice_amount_date'),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name='payment',
            name='unique_payment_per_invoice_amount_date',
        ),
        migrations.AlterField(
            model_name='payment',
            name='status',
            field=models.CharField(choices=[('pending', 'Pending'), ('completed', 'Completed'), ('failed', 'Failed'), ('cancelled', 'Cancelled'), ('refunded', 'Refunded')], default='completed', max_length=20, verbose_name='Status'),
        ),
        migrations.AddIndex(
            model_name='payment',
            index=models.Index(fields=['created_at'], name='finance_pay_created_859d0d_idx'),
        ),
        migrations.AddConstraint(
            model_name='payment',
            constraint=models.UniqueConstraint(condition=models.Q(('transaction_id', ''), _negated=True), fields=('invoice', 'transaction_id'), name='unique_transaction_per_invoice'),
        ),
    ]
