Ran
|
Jobs
1
|
Files
48
|
Run time
2s
|
Badge
Embed ▾
README BADGES
|
push
travis-ci
<a href="https://github.com/okfn/website/commit/<a class=hub.com/okfn/website/commit/1ff532c7c30a3415aa8b1d393d237941f8a9c048">1ff532c7c<a href="https://github.com/okfn/website/commit/1ff532c7c30a3415aa8b1d393d237941f8a9c048">">Temp fix to apply migrations correctly to staging/prod DBs This one is pretty obscure There are a couple of issues with third party plugin migrations we need to solve here: 1. https://github.com/aldryn/aldryn-video/blob/</a><a class="double-link" href="https://github.com/okfn/website/commit/<a class="double-link" href="https://github.com/okfn/website/commit/126580c04fc6c0c60d23361280d56bd5333f5c51">126580c04</a>">126580c04</a><a href="https://github.com/okfn/website/commit/1ff532c7c30a3415aa8b1d393d237941f8a9c048">/aldryn_video/migrations/0001_initial.py#L11-L12 depends on `__latest__` (which is essentially bug in most cases for this reason). Having already applied `aldryn_video 0001` now means we can't apply `cms 0016` the `temp_migration_settings` file allows us to temporarily un-register `aldryn_video` by running `python manage.py migrate cms 0016 --settings foundation.temp_migration_settings` without either breaking the site or failing on `django.db.migrations.exceptions.InconsistentMigrationHistory: Migration aldryn_video.0001_initial is applied before its dependency cms.0016_auto_20160608_1535 on database 'default'.` 2. Some other migration relies on `easy_thumbnails 0001` but doesn't declare it as a migration dependency, so we need to run `python manage.py migrate easy_thumbnails` to avoid throwing `django.db.utils.ProgrammingError: relation "easy_thumbnails_source" does not exist` 3. Once we've done those we can run `python manage.py migrate` to apply the remaining issues without error Once we've run this once on staging and once on production to migrate the existing DBs correctly, we can do another commit to revert this change and delete `temp_migration_settings` and set CMD back to `python manage.py migrate && python manage.py update_index && /usr/bin/supervisord` before the next deploy.
40 of 58 branches covered (68.97%)
837 of 911 relevant lines covered (91.88%)
0.92 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 877.1 | 48 |
91.88 |
Travis Job 877.1 |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|