Fix migrations when there is a custom user model