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

Packages cannot be loaded as part of an initial migration #11823

Open
bferguso opened this issue Feb 28, 2025 · 0 comments · May be fixed by #11824
Open

Packages cannot be loaded as part of an initial migration #11823

bferguso opened this issue Feb 28, 2025 · 0 comments · May be fixed by #11824
Assignees

Comments

@bferguso
Copy link
Contributor

There are 2 issues that cause the failure of a package to be loaded as part of a setup_db call:

  1. The load_package option of the packages management command makes a call to the refresh_geojson_geometries() postgres function, which fails if it is within a transaction. This causes the migration to fail from a migration as it is in a transaction.
  2. the management.call_command("createcachetable") call happens after the management.call_command("migrate") call in the setup_db management command. This causes errors when loading the package graphs because the process tries to delete rows from the user_permission_cache table which is not present until after the migration completes.

Fixing these two issues will allow a package to be loaded as part of an initial migration.

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

Successfully merging a pull request may close this issue.

1 participant