now that we know the idswe can migrate the database (venv)learning_logpython manage py makemigrations learning_logs you are trying to add non-nullable field 'ownerto topic without defaultwe can' do that (the database needs something to populate existing rowsw please select fix provide one-off default now (will be set on all existing rows quitand let me add default in models py select an option please enter the default value nowas valid python the datetime and django utils timezone modules are availableso you can do timezone now( migrations for 'learning_logs' _topic_owner pyadd field owner to topic we start by issuing the makemigrations command in the output at vdjango indicates that we're trying to add required (non-nullablefield to an existing model (topicwith no default value specified django gives us two options at wwe can provide default right nowor we can quit and add default value in models py at we've chosen the first option django then asks us to enter the default value to associate all existing topics with the original admin userll_admini entered the user id of at you can use the id of any user you've createdit doesn' have to be superuser django then migrates the database using this value and generates the migration file _topic_owner pywhich adds the field owner to the topic model now we can carry out the migration enter the following in an active virtual environment(venv)learning_logpython manage py migrate operations to performsynchronize unmigrated appsmessagesstaticfiles apply all migrationslearning_logscontenttypessessionsadminauth --snip-running migrationsrendering model states done applying learning_logs _topic_owner ok (venv)learning_logdjango applies the new migrationand the result is ok we can verify that the migration worked as expected in the shell sessionlike thisu from learning_logs models import topic for topic in topic objects all()print(topictopic owner