Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.web.tests.test_migrations::Tests / Python tests / test_migrations_12_add_note_to_sor_model
Failed

TEST RESULT

Run At
Mar 29 2022, 10:03 AM
Details
self = <django.db.backends.utils.CursorWrapper object at 0x7fea6fb15550> sql = 'CREATE TABLE "add_forge_now_request" ("id" serial NOT NULL PRIMARY KEY, "status" text NOT NULL, "submission_date" tim...forge_contact_email" varchar(254) NOT NULL, "forge_contact_name" text NOT NULL, "forge_contact_comment" text NOT NULL)' params = None ignored_wrapper_args = (False, {'connection': <django.db.backends.postgresql.base.DatabaseWrapper object at 0x7fea78b10ef0>, 'cursor': <django.db.backends.utils.CursorWrapper object at 0x7fea6fb15550>}) def _execute(self, sql, params, *ignored_wrapper_args): self.db.validate_no_broken_transaction() with self.db.wrap_database_errors: if params is None: > return self.cursor.execute(sql) E psycopg2.errors.DuplicateTable: relation "add_forge_now_request" already exists .tox/py3/lib/python3.7/site-packages/django/db/backends/utils.py:82: DuplicateTable The above exception was the direct cause of the following exception: migrator = <django_test_migrations.migrator.Migrator object at 0x7fea6f92f748> def test_migrations_12_add_note_to_sor_model(migrator): """Ensures the migration adds the user_id field to SaveOriginRequest table""" > old_state = migrator.apply_initial_migration((APP_NAME, MIGRATION_0011),) .tox/py3/lib/python3.7/site-packages/swh/web/tests/test_migrations.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/django_test_migrations/migrator.py:61: in apply_initial_migration return self._migrate(targets, plan=plan) .tox/py3/lib/python3.7/site-packages/django_test_migrations/migrator.py:84: in _migrate return self._executor.migrate(migration_targets, plan=plan) .tox/py3/lib/python3.7/site-packages/django/db/migrations/executor.py:117: in migrate state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial) .tox/py3/lib/python3.7/site-packages/django/db/migrations/executor.py:147: in _migrate_all_forwards state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial) .tox/py3/lib/python3.7/site-packages/django/db/migrations/executor.py:245: in apply_migration state = migration.apply(state, schema_editor) .tox/py3/lib/python3.7/site-packages/django/db/migrations/migration.py:124: in apply operation.database_forwards(self.app_label, schema_editor, old_state, project_state) .tox/py3/lib/python3.7/site-packages/django/db/migrations/operations/models.py:92: in database_forwards schema_editor.create_model(model) .tox/py3/lib/python3.7/site-packages/django/db/backends/base/schema.py:307: in create_model self.execute(sql, params or None) .tox/py3/lib/python3.7/site-packages/django/db/backends/base/schema.py:137: in execute cursor.execute(sql, params) .tox/py3/lib/python3.7/site-packages/django/db/backends/utils.py:67: in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) .tox/py3/lib/python3.7/site-packages/django/db/backends/utils.py:76: in _execute_with_wrappers return executor(sql, params, many, context) .tox/py3/lib/python3.7/site-packages/django/db/backends/utils.py:82: in _execute return self.cursor.execute(sql) .tox/py3/lib/python3.7/site-packages/django/db/utils.py:89: in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <django.db.backends.utils.CursorWrapper object at 0x7fea6fb15550> sql = 'CREATE TABLE "add_forge_now_request" ("id" serial NOT NULL PRIMARY KEY, "status" text NOT NULL, "submission_date" tim...forge_contact_email" varchar(254) NOT NULL, "forge_contact_name" text NOT NULL, "forge_contact_comment" text NOT NULL)' params = None ignored_wrapper_args = (False, {'connection': <django.db.backends.postgresql.base.DatabaseWrapper object at 0x7fea78b10ef0>, 'cursor': <django.db.backends.utils.CursorWrapper object at 0x7fea6fb15550>}) def _execute(self, sql, params, *ignored_wrapper_args): self.db.validate_no_broken_transaction() with self.db.wrap_database_errors: if params is None: > return self.cursor.execute(sql) E django.db.utils.ProgrammingError: relation "add_forge_now_request" already exists .tox/py3/lib/python3.7/site-packages/django/db/backends/utils.py:82: ProgrammingError