# Generated by Django 5.2.8 on 2025-11-07 10:06

import django.core.validators
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('igny8_core_auth', '0007_expand_plan_limits'),
    ]

    operations = [
        migrations.CreateModel(
            name='PasswordResetToken',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.CharField(db_index=True, max_length=255, unique=True)),
                ('expires_at', models.DateTimeField()),
                ('used', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'db_table': 'igny8_password_reset_tokens',
                'ordering': ['-created_at'],
            },
        ),
        migrations.AlterModelOptions(
            name='industry',
            options={'ordering': ['name'], 'verbose_name': 'Industry', 'verbose_name_plural': 'Industries'},
        ),
        migrations.AlterModelOptions(
            name='industrysector',
            options={'ordering': ['industry', 'name'], 'verbose_name': 'Industry Sector', 'verbose_name_plural': 'Industry Sectors'},
        ),
        migrations.AlterModelOptions(
            name='site',
            options={'ordering': ['-created_at']},
        ),
        migrations.AlterModelOptions(
            name='siteuseraccess',
            options={'verbose_name': 'Site User Access', 'verbose_name_plural': 'Site User Access'},
        ),
        migrations.RenameIndex(
            model_name='industry',
            new_name='igny8_indus_slug_2f8769_idx',
            old_name='igny8_indu_slug_idx',
        ),
        migrations.RenameIndex(
            model_name='industry',
            new_name='igny8_indus_is_acti_146d41_idx',
            old_name='igny8_indu_is_acti_idx',
        ),
        migrations.RenameIndex(
            model_name='industrysector',
            new_name='igny8_indus_industr_00b524_idx',
            old_name='igny8_indu_industr_idx',
        ),
        migrations.RenameIndex(
            model_name='industrysector',
            new_name='igny8_indus_slug_101d63_idx',
            old_name='igny8_indu_slug_1_idx',
        ),
        migrations.RenameIndex(
            model_name='sector',
            new_name='igny8_secto_industr_1cf990_idx',
            old_name='igny8_sect_industr_idx',
        ),
        migrations.RenameIndex(
            model_name='site',
            new_name='igny8_sites_industr_66e004_idx',
            old_name='igny8_site_industr_idx',
        ),
        migrations.AlterField(
            model_name='plan',
            name='credits_per_month',
            field=models.IntegerField(default=0, help_text='DEPRECATED: Use included_credits instead', validators=[django.core.validators.MinValueValidator(0)]),
        ),
        migrations.AlterField(
            model_name='plan',
            name='extra_credit_price',
            field=models.DecimalField(decimal_places=2, default=0.01, help_text='Price per additional credit', max_digits=10),
        ),
        migrations.AlterField(
            model_name='plan',
            name='stripe_price_id',
            field=models.CharField(blank=True, help_text='Monthly price ID for Stripe', max_length=255, null=True),
        ),
        migrations.AddField(
            model_name='passwordresettoken',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='password_reset_tokens', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddIndex(
            model_name='passwordresettoken',
            index=models.Index(fields=['token'], name='igny8_passw_token_0eaf0c_idx'),
        ),
        migrations.AddIndex(
            model_name='passwordresettoken',
            index=models.Index(fields=['user', 'used'], name='igny8_passw_user_id_320c02_idx'),
        ),
        migrations.AddIndex(
            model_name='passwordresettoken',
            index=models.Index(fields=['expires_at'], name='igny8_passw_expires_c9aa03_idx'),
        ),
    ]
