You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E.g. needed by Django support -- a default new project schema requires it:
11:10 $ ./manage.py migrate
/home/mikhail/test/django/venv/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
""")
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
Applying contenttypes.0001_initial...Traceback (most recent call last):
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
psycopg2.NotSupportedError: UNIQUE constraint not supported yet
LINE 1: ...jango_content_type_app_label_model_76bd3d3b_uniq" UNIQUE ("a...
^
HINT: Please contact YugaByte for its release schedule.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
output = self.handle(*args, **options)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/core/management/base.py", line 83, in wrapped
res = handle_func(*args, **kwargs)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 203, in handle
fake_initial=fake_initial,
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/migrations/executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
state = migration.apply(state, schema_editor)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/migrations/migration.py", line 124, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/migrations/operations/models.py", line 514, in database_forwards
getattr(new_model._meta, self.option_name, set()),
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/backends/base/schema.py", line 360, in alter_unique_together
self.execute(self._create_unique_sql(model, columns))
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/backends/base/schema.py", line 133, in execute
cursor.execute(sql, params)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 100, in execute
return super().execute(sql, params)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 68, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/mikhail/test/django/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
django.db.utils.NotSupportedError: UNIQUE constraint not supported yet
LINE 1: ...jango_content_type_app_label_model_76bd3d3b_uniq" UNIQUE ("a...
^
HINT: Please contact YugaByte for its release schedule.
The text was updated successfully, but these errors were encountered:
Summary:
We already have UNIQUE index support, and all work necessary for UNIQUE constraint support was
essentially done by @robert in #955
All that was left to do was to enable UNIQUE constraint in grammar and add test coverage.
Test Plan: ./yb_build.sh release --java-test org.yb.pgsql.TestPgUniqueConstraint
Reviewers: mikhail, neil, robert
Reviewed By: robert
Subscribers: neha, mihnea, robert, yql
Differential Revision: https://phabricator.dev.yugabyte.com/D6458
E.g. needed by Django support -- a default new project schema requires it:
The text was updated successfully, but these errors were encountered: