Search code examples
djangodjango-south

errors during migration after moving to mariadb


I made the switch from sqllite to mariadb today, the initial migration process halts during the migration of the thirdparty app called django-locality(it provides models countries and territories).

Here is the error.

ValueError: Problem installing fixture '/code/lmalp/locality/fixtures/initial_data.json': The database backend does not accept 0 as a value for AutoField.

Solution

  • The fixture holds multiple object mappings with a primary key of 0, see:

    https://github.com/rfkrocktk/django-locality/blob/master/src/locality/fixtures/initial_data.json#L18

    Quick fix, replace the fixture with your own