无法通过django shell删除heroku表

无法通过django shell删除heroku表,django,heroku,Django,Heroku,我正在尝试删除heroku中托管的表。因为它在共享数据库中,我不能直接连接到postgres来执行句子。我通过djangoshell执行delete。问题是表名是大写的,出于未知原因,django尝试用小写删除它: >>> sql = '''drop table campings_horesEntrega cascade; <---see uppercases ... drop table campings_horesRecollida; '''

我正在尝试删除heroku中托管的表。因为它在共享数据库中,我不能直接连接到postgres来执行句子。我通过djangoshell执行delete。问题是表名是大写的,出于未知原因,django尝试用小写删除它:

>>> sql = '''drop table campings_horesEntrega cascade;    <---see uppercases
...          drop table campings_horesRecollida; '''
>>> 
>>> from django.db import connections, transaction
>>> cursor = connections['default'].cursor()
>>> cursor.execute(sql)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/backends/util.py", line 40, in execute
    return self.cursor.execute(sql, params)
  File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute
    return self.cursor.execute(query, args)
DatabaseError: table "campings_horesentrega" does not exist   <--- see lowercases

sql='''drop table campings\u horesEntrega cascade 如果希望postgres尊重大小写,则需要将表名用引号括起来

DROP TABLE "campings_horesEntrega" CASCADE;

谢谢我是博士后的新手。我知道:oracle->“、sqlserver->[、mysql->`,现在postgres=oracle->”