# Generated by Django 5.2.3 on 2025-06-21 14:42

import django.contrib.postgres.indexes
import djmoney.models.fields
from decimal import Decimal
from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ('pay_way', '0008_payway_configuration_payway_is_online_payment_and_more'),
    ]

    operations = [
        migrations.RemoveIndex(
            model_name='payway',
            name='pay_way_free_order_ix',
        ),
        migrations.RenameField(
            model_name='payway',
            old_name='free_for_order_amount_currency',
            new_name='free_threshold_currency',
        ),
        migrations.RemoveField(
            model_name='payway',
            name='free_for_order_amount',
        ),
        migrations.AddField(
            model_name='payway',
            name='free_threshold',
            field=djmoney.models.fields.MoneyField(decimal_places=2, default=Decimal('0'), help_text='Order amount above which this payment method becomes free', max_digits=11, verbose_name='Free Threshold'),
        ),
        migrations.AddIndex(
            model_name='payway',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['free_threshold'], name='pay_way_free_threshold_ix'),
        ),
    ]
