Skip to content

Instantly share code, notes, and snippets.

@creimers
Created September 16, 2025 08:02
Show Gist options
  • Save creimers/67a02f0b07bb300b4e8f0798c472f860 to your computer and use it in GitHub Desktop.
Save creimers/67a02f0b07bb300b4e8f0798c472f860 to your computer and use it in GitHub Desktop.
Applying djangocms_versioning.0017_merge_20230514_1027... OK
Applying taggit.0006_rename_taggeditem_content_type_object_id_taggit_tagg_content_8fc721_idx... OK
/srv/.venv/lib/python3.9/site-packages/djangocms_4_migration/management/commands/migrate_alias_plugins.py:207: UserWarning: No user has been supplied when creating a new AliasContent object. No version could be created. Make sure that the creating code also creates a Version objects or use AliasContent.objects.with_user(user).create(...)
alias_content = AliasContent.objects.create(
Error plugin 436122 Doesn't exist at the position in placeholder 11614
Error plugin 435872 Doesn't exist at the position in placeholder 11614
Error plugin 327392 Doesn't exist at the position in placeholder 12340
Error plugin 434903 Doesn't exist at the position in placeholder 11614
Error plugin 108175 Doesn't exist at the position in placeholder 11948
Error plugin 361833 Doesn't exist at the position in placeholder 12519
Error plugin 219361 Doesn't exist at the position in placeholder 10190
Error plugin 219360 Doesn't exist at the position in placeholder 10190
Error plugin 265936 Doesn't exist at the position in placeholder 10713
/srv/.venv/lib/python3.9/site-packages/djangocms_4_migration/management/commands/migrate_static_placeholders.py:135: UserWarning: No user has been supplied when creating a new AliasContent object. No version could be created. Make sure that the creating code also creates a Version objects or use AliasContent.objects.with_user(user).create(...)
alias_content = AliasContent.objects.create(
Traceback (most recent call last):
File "/srv/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.ForeignKeyViolation: update or delete on table "cms_page" violates foreign key constraint "djangocms_page_meta__extended_object_id_3e42f99f_fk_cms_page_" on table "djangocms_page_meta_pagemeta"
DETAIL: Key (id)=(628) is still referenced from table "djangocms_page_meta_pagemeta".
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/srv/./source/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/srv/.venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/srv/.venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/srv/.venv/lib/python3.9/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/srv/.venv/lib/python3.9/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/srv/.venv/lib/python3.9/site-packages/djangocms_4_migration/management/commands/cms4_migration.py", line 22, in handle
call_command("migration_cleanup")
File "/srv/.venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 194, in call_command
return command.execute(*args, **defaults)
File "/srv/.venv/lib/python3.9/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/srv/.venv/lib/python3.9/site-packages/djangocms_4_migration/management/commands/migration_cleanup.py", line 198, in handle
_delete_page(page)
File "/srv/.venv/lib/python3.9/site-packages/djangocms_4_migration/management/commands/migration_cleanup.py", line 140, in _delete_page
cursor.execute("DELETE FROM cms_page WHERE id = %s", [page.id])
File "/srv/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 102, in execute
return super().execute(sql, params)
File "/srv/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "/srv/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/srv/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/srv/.venv/lib/python3.9/site-packages/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/srv/.venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
django.db.utils.IntegrityError: update or delete on table "cms_page" violates foreign key constraint "djangocms_page_meta__extended_object_id_3e42f99f_fk_cms_page_" on table "djangocms_page_meta_pagemeta"
DETAIL: Key (id)=(628) is still referenced from table "djangocms_page_meta_pagemeta".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment