Page MenuHomeSoftware Heritage

swh/deposit/migrations/0021: Fix migration script
ClosedPublic

Authored by ardumont on Dec 10 2020, 5:32 PM.

Details

Summary

Prior to this commit, running this script would not work when actually
triggered on a db with data:

swhdeposit@deposit:~$ django-admin migrate --settings=swh.deposit.settings.production
Operations to perform:
  Apply all migrations: auth, contenttypes, deposit, sessions
Running migrations:
  Applying deposit.0021_deposit_origin_url_20201124_1438...Traceback (most recent call last):
...
TypeError: guess_deposit_origin_url() missing 1 required positional argument: 'deposit'
Test Plan

tox

Diff Detail

Repository
rDDEP Push deposit
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D4717 (id=16711)

Rebasing onto c436adcf2b...

Current branch diff-target is up to date.
Changes applied before test
commit 73ee587df9bfd067e7069c3cb652108e93b31a6c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Dec 10 17:29:50 2020 +0100

    swh/deposit/migrations/0021: Fix migration script
    
    Prior to this commit, running this script would not work when actually
    triggered on a db with data:
swhdeposit@deposit:~$ django-admin migrate --settings=swh.deposit.settings.production
Operations to perform:
  Apply all migrations: auth, contenttypes, deposit, sessions
Running migrations:
  Applying deposit.0021_deposit_origin_url_20201124_1438...Traceback (most recent call last):
...
TypeError: guess_deposit_origin_url() missing 1 required positional argument: 'deposit'
```
See https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/478/ for more details.
This revision is now accepted and ready to land.Dec 10 2020, 6:55 PM