#25540: Reusing databases doesn't work on PostgreSQL for migrations tests
----------------------------------+------------------------------------
     Reporter:  Anssi Kääriäinen  |                    Owner:  nobody
         Type:  Bug               |                   Status:  new
    Component:  Migrations        |                  Version:  master
     Severity:  Normal            |               Resolution:
     Keywords:                    |             Triage Stage:  Accepted
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+------------------------------------
Changes (by Tim Graham):

 * component:  Testing framework => Migrations


Comment:

 I attached a patch to get someone started. I used the following workflow:

 `./runtests.py --settings=test_postgres migrations --parallel=1 --noinput
 --keepdb --failfast`
 (no errors)
 `./runtests.py --settings=test_postgres migrations --parallel=1 --noinput
 --keepdb --failfast`

 At this point you can observe and fix the next failure. With my patch
 applied, the next failure I see is
 test_regression_22823_unmigrated_fk_to_migrated_model
 (migrations.test_commands.MigrateTests). It's helpful to use pgAdmin to
 examine the state of the test database.

 After you add a possible fix for thetest, run the tests without --keepdb
 to clear the bad state from the database. You can then repeat these steps
 from the top.
 `./runtests.py --settings=test_postgres migrations --parallel=1 --noinput`

--
Ticket URL: <https://code.djangoproject.com/ticket/25540#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.871d4fff2b59111a0bdc79dadb20e84f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to