python manage.py makemigrations foo
You are trying to add a non-nullable field 'id' to foo without a default; we can't do that (the database needs something to populate existing rows).
Please select a fix:
1) Provide a one-off default now (will be set on all existing rows)
2) Quit, and let me add a default in models.py
Select an option:

Putting some dummy default=0 or something in the migration does not help either.

This can be semi-automated by first ensuring the field arguments are explicitly set for foo_id (foo_id = models.AutoField(primary_key=True, db_column='foo_id'), then running makemigrations followed by a rename (id = models.AutoField(primary_key=True, db_column='foo_id') and another makemigrations (the latter will ask if foo.foo_id is being renamed to foo.id).