Issue #117 resolved

Initial south migration fails with custom User model (django 1.5)

Anonymous created an issue


it is impossible to migrate an empty (initial) database when there is a custom User model.

MAYBE this is South's bug or a bug in other components, but I am testing Django 1.5 since a few hours and it's really hard for me to tell that, esp. when it comes to migrations... so please have a look at it and tell me please, am I right?

C:\Users\dotz\Desktop\admintoolsbug> migrate Running migrations for menu: - Migrating forwards to 0001_initial.

menu:0001_initial ValueError: Cannot successfully create field 'user' for model 'bookmark': "The model 'myuser' from the app 'proof' is not available in this migration.".

Comments (7)

  1. Michał Pasternak

    What helped was explictly adding a fake model of my custom User class to a migration file, like:

        models = {
         'bpp.bppuser': {
                'Meta': {'ordering': "('id',)", 'object_name': 'BppUser', 'db_table': "'admin_tools_menu_bookmark'"},
                'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  2. Log in to comment