• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 22775989014 / 1
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1532-django-model-admin-for-extra-project-metadata-fields
DEFAULT BRANCH: master
Ran 06 Mar 2026 06:47PM UTC
Files 885
Run time 21s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Mar 2026 06:11PM UTC coverage: 78.906% (-0.01%) from 78.92%
22775989014.1

push

github

web-flow
fix(migrations): fix materialized view migration conflict DEV-1822 (#6796)

### 📣 Summary
Fixes a database locking issue caused by the
`user_reports_userreportsmv` materialized view that could block
migrations during upgrades or local setup.

### 📖 Description
This update resolves a technical conflict where the background
materialized view used for user reports (`user_reports_userreportsmv`)
would lock database tables, preventing database migrations from applying
successfully.

This PR automates the resolution:
1. Adds a management command (`manage_user_reports_mv`) to safely handle
dropping and recreating the view.
2. Updates `scripts/migrate.sh` to automatically intercept the
`django.db.utils.NotSupportedError`. When detected, the script drops the
view, safely applies the blocked migrations, and then manages the
recreation.
3. Respects `SKIP_HEAVY_MIGRATIONS`: To prevent container orchestrators
from timing out during deployment, if heavy migrations are skipped, the
view recreation is deferred to a Celery Long-Running Migration
background task (`0019_recreate_user_reports_mv`), ensuring instant
container startup.
---------

Co-authored-by: Olivier Léger <olivierleger@gmail.com>

7080 of 11475 branches covered (61.7%)

27161 of 34422 relevant lines covered (78.91%)

0.79 hits per line

Source Files on job 22775989014.1
  • Tree
  • List 885
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 22775989014
  • be291045 on github
  • Prev Job for on release/2.026.03 (#22725085698.1)
  • Next Job for on release/2.026.03 (#22857660450.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc