0

I am unable to drop database/table. Here are the sequence of commands I am running.

psql

\l

after seeing my database name(XXX),

DROP DATABASE XXXX

\l

XXX is still present.

I tried to restart the psql and also rebooted my laptop.I must be doing something wrong but it has consumed more than 2 hours. Any help?

Community
  • 1
  • 1
Puneet
  • 753
  • 3
  • 9
  • 24
  • Why would 'django.core.paginator' be in installed apps? It's not an app. – Bogdan Iulian Bursuc Oct 19 '15 at 06:15
  • I don't have the link but I followed the steps to add pagination.And pagination started to work too.If you say so, I will remove that from installed apps and see if it is still working. – Puneet Oct 19 '15 at 06:19
  • @Puneet what Django version are you using? – SilentDev Oct 19 '15 at 06:23
  • 1.8.4 . I tried migration command too. I am trying the suggestion provided by Bogdan but I cannot verify it since syncdb is not adding the new field in database and when i open the app in admin it crashes saying that particular field is not found – Puneet Oct 19 '15 at 06:27
  • 2
    Here is the pagination documentation: https://docs.djangoproject.com/en/1.8/topics/pagination/ But I don't see anything about adding the pagination module to INSTALLED_APPS, doesn;t make sense. I suggest you tell us what you trying to achieve. The whole picture, and maybe we can advice in the right direction. – Bogdan Iulian Bursuc Oct 19 '15 at 06:30
  • @Bogdan I am adding a new field.Syncdb is not working. And I removed the pagination module from installed_app. If you can add your solution , I can mark that as the answer. For syncdb not adding the new field , I will add seperate question,if required. – Puneet Oct 19 '15 at 06:39
  • 1
    It would be great if you print the traceback of your syncdb command (with pagination deleted from apps) here. – chem1st Oct 19 '15 at 07:19
  • Migration is really a mess. I guess Django developers will change this part soon. I solve my problems with python manage.py sql [app_name] and add field manually to database. When you first create a model, syncdb works but not updates old ones. Migrate is also very confusing for me. – Deniz Kaplan Oct 19 '15 at 08:42

1 Answers1

0

So I have edited my question but now I feel i did for worse.Anyways, the solution to my problem was already present in stackoverflow. Sorry for duplication

PostgreSQL: Drop Database but DB is still there

Community
  • 1
  • 1
Puneet
  • 753
  • 3
  • 9
  • 24