Opened 3 years ago

Closed 3 years ago

#26838 closed Bug (duplicate)

Disabling migrations via DATABASE['TEST']['MIGRATE'] affects non-testing environment

Reported by: Atul Varma Owned by: nobody
Component: Migrations Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hello! I'm using 1.10b1 and I added the following to the end of my settings.py:

DATABASES['default']['TEST'] = {'MIGRATE': False}

This made my tests succeed without requiring me to create proper migrations for them, which was great, because it allowed me to tinker with my models without needing to generate migrations.

However, once I was done tinkering, I made a migration, which succeeded--but running manage.py migrate claimed there were no migrations to be applied! And manage.py showmigrations printed nothing, which was also odd. Once I removed the above line of code from my settings.py, however, both of these commands started working again.

So I might be wrong, but it appeared as though my change to settings.py actually disabled migrations for my whole project, rather than only disabling them for tests.

If this warrants further inspection, I can try creating a simple test case for it.

Change History (1)

comment:1 Changed 3 years ago by Tim Graham

Resolution: duplicate
Status: newclosed

I see the same behavior. I'll reopen the original ticket: #25388. Thanks!

Note: See TracTickets for help on using tickets.
Back to Top