Tuesday, December 28, 2021

Re: are migrations the same regardless of database type?

As far as I know, the migrations are "Python-Code" in themselves, only
defining which tables change in what way. Only when they are being
applied, this is turned into actual database code.

But you can test this easily by creating migrations and look at them. Or
use e.g. a postgres docker container, if my memory is wrong.

Cheers

Lars

Am 28.12.21 um 16:02 schrieb Anil Felipe Duggirala:
> hello,
> I running an app locally using an SQlite database (I have not been able to set up postgresql locally). I am running the same app in Heroku, using Postgresql.
> If I run "makemigrations" locally, then push those migrations to Heroku (which is using postgresql), will those migrations be applied correctly by just doing "migrate" on Heroku.
> Do the contents of migrations files depend on the database type that is associated to the app when creating the migrations?
> thank you,
>
> Anil F
>
--
punkt.de GmbH
Lars Liedtke
.infrastructure

Kaiserallee 13a
76133 Karlsruhe

Tel. +49 721 9109 500
https://infrastructure.punkt.de
info@punkt.de

AG Mannheim 108285
Geschäftsführer: Jürgen Egeling, Daniel Lienert, Fabian Stein

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/af8fec05-774c-d007-c2c9-1b99cb6d7d9a%40punkt.de.

No comments:

Post a Comment