Opened 10 years ago

Closed 10 years ago

#22854 closed Bug (duplicate)

Having custom user model creates migrations in django.contrib.auth

Reported by: Vidir Valberg Gudmundsson Owned by: nobody
Component: Migrations Version: dev
Severity: Release blocker Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This happened when reporting #22853, so it has the same custom user model and same occurences.

Models

from django.db import models
from django.contrib.auth.models import AbstractUser


class Profile(AbstractUser):
    title = models.CharField(max_length=255)

Makemigrations output

$ ./manage.py makemigrations
Migrations for 'testapp':
  0001_initial.py:
    - Create model Profile
Migrations for 'auth':
  0002_auto_20140617_1231.py:
    - Remove field groups from user
    - Remove field user_permissions from user
    - Delete model User

New auth migration content

> cat django/contrib/auth/migrations/0002_auto_20140617_1231.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

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

    operations = [
        migrations.RemoveField(
            model_name='user',
            name='groups',
        ),
        migrations.RemoveField(
            model_name='user',
            name='user_permissions',
        ),
        migrations.DeleteModel(
            name='User',
        ),
    ]

Change History (1)

comment:1 by Tim Graham, 10 years ago

Resolution: duplicate
Status: newclosed

Consolidating this with #22853.

Note: See TracTickets for help on using tickets.
Back to Top