Fix migrations to work with custom user model