# Generated by Django 5.2.9 on 2025-12-16 19:02

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('images', '0002_initial'),
        ('posts', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='post',
            name='created_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posts', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='post',
            name='images',
            field=models.ManyToManyField(blank=True, related_name='posts', to='images.image'),
        ),
        migrations.AddIndex(
            model_name='post',
            index=models.Index(fields=['created_at'], name='posts_post_created_dadbfe_idx'),
        ),
        migrations.AddIndex(
            model_name='post',
            index=models.Index(fields=['is_active', 'created_at'], name='posts_post_is_acti_b464be_idx'),
        ),
        migrations.AddIndex(
            model_name='post',
            index=models.Index(fields=['category_id', 'created_at'], name='posts_post_categor_fce0f7_idx'),
        ),
        migrations.AddIndex(
            model_name='post',
            index=models.Index(fields=['created_by_id', 'created_at'], name='posts_post_created_3a7268_idx'),
        ),
    ]
