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

10799_geojsongeometry_featureid can't be reversed #11568

Closed
jacobtylerwalls opened this issue Oct 23, 2024 · 1 comment · Fixed by #11569
Closed

10799_geojsongeometry_featureid can't be reversed #11568

jacobtylerwalls opened this issue Oct 23, 2024 · 1 comment · Fixed by #11569
Assignees
Labels
Type: Bug Something isn't working

Comments

@jacobtylerwalls
Copy link
Member

From a fully migrated 7.6/8.0.dev db:

python manage.py migrate models 10999_update_principaluser
django.db.utils.OperationalError: cannot ALTER TABLE "geojson_geometries" because it has pending trigger events

I've found that calling refresh_geojson_geometries() inside a RunSQL operation is pretty fragile because the function truncates a table and disturbs the per-migration transaction. Things usually work if you isolate the single migration operation involving that function into its own file.

That said, 7.6 has already shipped, so we can't easily insert a new migration into the middle of the history. We could cheat a little bit and just move this AddField operation into the previous migration and a comment explaining what/why:

migrations.AddField(
model_name="geojsongeometry",
name="featureid",
field=models.UUIDField(blank=True, null=True, serialize=False),
),

@jacobtylerwalls jacobtylerwalls added the Type: Bug Something isn't working label Oct 23, 2024
@jacobtylerwalls jacobtylerwalls linked a pull request Oct 23, 2024 that will close this issue
11 tasks
@jacobtylerwalls jacobtylerwalls self-assigned this Oct 23, 2024
whatisgalen added a commit that referenced this issue Oct 28, 2024
@whatisgalen
Copy link
Member

fixed by #11569

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants