julianwachholz / django-guest-user

A Django app that allows visitors to interact with your site as a guest user without requiring registration.
https://django-guest-user.readthedocs.io/
MIT License
74 stars 12 forks source link

missing migration ? #10

Closed clavay closed 1 year ago

clavay commented 1 year ago

Hello,

After installing django-guest-user, if I run the makemigrations command of django manage.py, it create a migration with :

# Generated by Django 4.2.2 on 2023-06-27 14:00

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('guest_user', '0001_initial'),
    ]

    operations = [
        migrations.AlterField(
            model_name='guest',
            name='id',
            field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
        ),
    ]

Is it normal ?

julianwachholz commented 1 year ago

It's possible this is because the guest user app doesn't specify a default auto field. I will add this line to apps.py which should remove this migration:

    default_auto_field = "django.db.models.BigAutoField"