Im this case Django should recognize the restriction and run the
migrations automatically.
--
Ticket URL: <https://code.djangoproject.com/ticket/34398>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
Comment:
Migrations are run automatically when using an in-memory SQLite database
to run the tests. If you're having trouble understanding how Django works,
see TicketClosingReasons/UseSupportChannels for ways to get help.
--
Ticket URL: <https://code.djangoproject.com/ticket/34398#comment:1>
Comment (by Yawar Quadir Amin):
OK good to know about the tests. But I'm not just talking about the tests.
If we set up SQLite in-memory database as the 'live' Django database, it
should also run the migrations automatically, no?
--
Ticket URL: <https://code.djangoproject.com/ticket/34398#comment:2>
Comment (by Mariusz Felisiak):
Replying to [comment:2 Yawar Quadir Amin]:
> If we set up SQLite in-memory database as the 'live' Django database, it
should also run the migrations automatically, no?
I'm not sure how you use SQLite in-memory database in production, but if
you do this you need to handle migrations on your own. For example, by
calling `call_command("migrate", ...)` in your scripts.
--
Ticket URL: <https://code.djangoproject.com/ticket/34398#comment:3>
Comment (by Yawar Quadir Amin):
We can use SQLite in-memory DB in production because our database of
record is maintained by another backend service, and the Django app is
just calling out to that service to authenticate users. So the Django DB
doesn't really matter, it's just a local cache.
Anyway, we will use a temp file for now since Django seems to not worry
about this use case ;-)
--
Ticket URL: <https://code.djangoproject.com/ticket/34398#comment:4>