Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when migrate postgres tables with double quotes and schema in db_table ("foo"."buzz_buzz") #19

Open
astronomiwe opened this issue Aug 18, 2022 · 0 comments

Comments

@astronomiwe
Copy link

  • Django Db Comments version: 0.4.1
  • Django version: 3.2.4
  • Python version: 3.8
  • Operating System: Ubuntu 20.04

Description

pip install django-db-comments package.
python manage.py migrate

Got error for table "foo"."buzz_buzz"
django.db.utils.ProgrammingError: relation ""foo"."buzz_buzz"" does not exist

What I Did

Traceback (most recent call last):
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 81, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedTable: relation ""lis"."document_types"" does not exist

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "manage.py", line 22, in
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/core/management/init.py", line 423, in execute_from_command_line
utility.execute()
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/core/management/init.py", line 417, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/core/management/base.py", line 368, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/core/management/base.py", line 412, in execute
output = self.handle(*args, **options)
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/core/management/base.py", line 93, in wrapped
res = handle_func(*args, **kwargs)
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 284, in handle
emit_post_migrate_signal(
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/core/management/sql.py", line 37, in emit_post_migrate_signal
models.signals.post_migrate.send(
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 181, in send
return [(receiver, receiver(signal=self, sender=sender, **named)) for receiver in self._live_receivers(sender)]
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 181, in
return [(receiver, receiver(signal=self, sender=sender, **named)) for receiver in self._live_receivers(sender)]
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django_db_comments/db_comments.py", line 114, in copy_help_texts_to_database
add_column_comments_to_database(columns_comments, using)
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django_db_comments/db_comments.py", line 57, in add_column_comments_to_database
cursor.execute(query, [comment])
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 96, in execute
return super().execute(sql, params)
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 63, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 72, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 81, in _execute
return self.cursor.execute(sql, params)
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/nmaslov/PycharmProjects/lis-backend/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 81, in _execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation ""lis"."document_types"" does not exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant