There is 1 other session using the database while resetting database in django using docker

I have been using docker with django. The app is up and running. But, when I changed the models and migrate it, the migrations is not being reflected in my database. So I am getting no column exists error :

      django.db.utils.ProgrammingError: column          ............_id does not exist

So, I want to reset the database and rerun makemigrations. But, When I run following commands :

  • Vagrant up --no-parallel flag meaning
  • Docker compose on docker swarm cluster separate containers on separate nodes
  • Docker apache and nginx port conflict
  • Path is not writable within container
  • How to run docker image in windows [closed]
  • SaltStack master/minion to administrate my database that is inside a container
  •   sudo docker-compose -f dev.yml run django python reset_db

    It gives following error:

     Traceback (most recent call last):
     File "", line 10, in <module>
         File "/usr/local/lib/python3.5/sitepackages/django/core/management/", line 353, in execute_from_command_line
         File "/usr/local/lib/python3.5/site-packages/django/core/management/", line 345, in execute
         File "/usr/local/lib/python3.5/site-packages/django/core/management/", line 348, in run_from_argv
         self.execute(*args, **cmd_options)
         File "/usr/local/lib/python3.5/site- packages/django/core/management/", line 399, in execute
         output = self.handle(*args, **options)
         File "/usr/local/lib/python3.5/site-  packages/django_extensions/management/", line 57, in inner
         ret = func(self, *args, **kwargs)
         File "/usr/local/lib/python3.5/site-packages/django_extensions/management/commands/", line 151, in handle
         psycopg2.OperationalError: database "postgres" is being accessed by other users
             DETAIL:  There is 1 other session using the database.

  • Google Kubernetes storage in EC2
  • Access host webcam using cvlc in Docker
  • How to configure an application in openshift via a REST endpoint?
  • Unable to modify files in container from docker
  • How can I read data from another data bucket with Google Datalab ipython notebook?
  • Cannot finde module 'express' (node app with docker)
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.