﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21151	Failures in the new schema tests	Florian Apolloner	Andrew Godwin <andrew@…>	"{{{
./runtests.py --settings=test_postgresql -v2 schema.tests.SchemaTests.test_m2m_repoint schema.tests.SchemaTests.test_m2m_create
Importing application schema
Creating test database for alias 'default' ('django_test')...
Operations to perform:
  Synchronize unmigrated apps: redirects, another_app, sessions, admin, admindocs, messages, sites, flatpages, staticfiles_tests, staticfiles, contenttypes, humanize, auth, test, schema, no_label, comments
  Apply all migrations: (none)
Synchronizing apps without migrations:
  Creating tables...
    Creating table django_content_type
    Creating table auth_permission
    Creating table auth_group_permissions
    Creating table auth_group
    Creating table auth_user_groups
    Creating table auth_user_user_permissions
    Creating table auth_user
    Creating table django_site
    Creating table django_flatpage_sites
    Creating table django_flatpage
    Creating table django_redirect
    Creating table django_session
    Creating table django_comments
    Creating table django_comment_flags
    Creating table django_admin_log
  Installing custom SQL...
  Installing indexes...
Running migrations:
  No migrations needed.
Installed 0 object(s) from 0 fixture(s)
Creating test database for alias 'other' (':memory:')...
Operations to perform:
  Synchronize unmigrated apps: redirects, another_app, sessions, admin, admindocs, messages, sites, flatpages, staticfiles_tests, staticfiles, contenttypes, humanize, auth, test, schema, no_label, comments
  Apply all migrations: (none)
Synchronizing apps without migrations:
  Creating tables...
    Creating table django_content_type
    Creating table auth_permission
    Creating table auth_group_permissions
    Creating table auth_group
    Creating table auth_user_groups
    Creating table auth_user_user_permissions
    Creating table auth_user
    Creating table django_site
    Creating table django_flatpage_sites
    Creating table django_flatpage
    Creating table django_redirect
    Creating table django_session
    Creating table django_comments
    Creating table django_comment_flags
    Creating table django_admin_log
  Installing custom SQL...
  Installing indexes...
Running migrations:
  No migrations needed.
Installed 0 object(s) from 0 fixture(s)
test_m2m_repoint (schema.tests.SchemaTests) ... ok
test_m2m_create (schema.tests.SchemaTests) ... ERROR
ERROR
ERROR

======================================================================
ERROR: test_m2m_create (schema.tests.SchemaTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/home/florian/sources/django.git/tests/schema/tests.py"", line 229, in test_m2m_create
    editor.create_model(BookWithM2M)
  File ""/home/florian/sources/django.git/django/db/backends/schema.py"", line 78, in __exit__
    self.execute(sql)
  File ""/home/florian/sources/django.git/django/db/backends/schema.py"", line 94, in execute
    cursor.execute(sql, params)
  File ""/home/florian/sources/django.git/django/db/utils.py"", line 101, in inner
    return func(*args, **kwargs)
  File ""/home/florian/sources/django.git/django/db/utils.py"", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File ""/home/florian/sources/django.git/django/db/utils.py"", line 101, in inner
    return func(*args, **kwargs)
ProgrammingError: relation ""schema_bookwithm2m_tags_5f958aa1"" already exists


======================================================================
ERROR: test_m2m_create (schema.tests.SchemaTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/home/florian/sources/django.git/tests/schema/tests.py"", line 30, in tearDown
    self.delete_tables()
  File ""/home/florian/sources/django.git/tests/schema/tests.py"", line 36, in delete_tables
    table_names = connection.introspection.table_names(cursor)
  File ""/home/florian/sources/django.git/django/db/backends/__init__.py"", line 1245, in table_names
    return sorted(self.get_table_list(cursor))
  File ""/home/florian/sources/django.git/django/db/backends/postgresql_psycopg2/introspection.py"", line 39, in get_table_list
    AND pg_catalog.pg_table_is_visible(c.oid)"""""")
  File ""/home/florian/sources/django.git/django/db/utils.py"", line 101, in inner
    return func(*args, **kwargs)
  File ""/home/florian/sources/django.git/django/db/utils.py"", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File ""/home/florian/sources/django.git/django/db/utils.py"", line 101, in inner
    return func(*args, **kwargs)
InternalError: current transaction is aborted, commands ignored until end of transaction block


======================================================================
ERROR: test_m2m_create (schema.tests.SchemaTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/home/florian/sources/django.git/django/test/testcases.py"", line 182, in __call__
    self._post_teardown()
  File ""/home/florian/sources/django.git/django/test/testcases.py"", line 765, in _post_teardown
    self._fixture_teardown()
  File ""/home/florian/sources/django.git/django/test/testcases.py"", line 786, in _fixture_teardown
    inhibit_post_migrate=self.available_apps is not None)
  File ""/home/florian/sources/django.git/django/core/management/__init__.py"", line 159, in call_command
    return klass.execute(*args, **defaults)
  File ""/home/florian/sources/django.git/django/core/management/base.py"", line 289, in execute
    output = self.handle(*args, **options)
  File ""/home/florian/sources/django.git/django/core/management/base.py"", line 419, in handle
    return self.handle_noargs(**options)
  File ""/home/florian/sources/django.git/django/core/management/commands/flush.py"", line 52, in handle_noargs
    allow_cascade=allow_cascade)
  File ""/home/florian/sources/django.git/django/core/management/sql.py"", line 113, in sql_flush
    tables = connection.introspection.django_table_names(only_existing=True)
  File ""/home/florian/sources/django.git/django/db/backends/__init__.py"", line 1274, in django_table_names
    existing_tables = self.table_names()
  File ""/home/florian/sources/django.git/django/db/backends/__init__.py"", line 1245, in table_names
    return sorted(self.get_table_list(cursor))
  File ""/home/florian/sources/django.git/django/db/backends/postgresql_psycopg2/introspection.py"", line 39, in get_table_list
    AND pg_catalog.pg_table_is_visible(c.oid)"""""")
  File ""/home/florian/sources/django.git/django/db/utils.py"", line 101, in inner
    return func(*args, **kwargs)
  File ""/home/florian/sources/django.git/django/db/utils.py"", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File ""/home/florian/sources/django.git/django/db/utils.py"", line 101, in inner
    return func(*args, **kwargs)
InternalError: current transaction is aborted, commands ignored until end of transaction block


----------------------------------------------------------------------
Ran 2 tests in 0.245s

FAILED (errors=3)
Destroying test database for alias 'default' ('django_test')...
Destroying test database for alias 'other' (':memory:')...
}}}"	Bug	closed	Database layer (models, ORM)	dev	Normal	fixed	migrations, schema	Andrew Godwin	Accepted	0	0	0	0	0	0
