Hi Mohammed,

You need to make sure that all migrations that you do in development also
can be run on the production machine - the migrations should be version
controlled and checked in. Then you can run migrate when deploying new code
and all migrations should just work. This is how I do it at least.

It seems as though you have different migrations on the server and
development machine? I think that adds complexity that you really don't
want.

And it doesn't matter if you have mysql on the production server and sqlite
locally. The database settings should differ but the migrations are (more
or less) database agnostic, so you should be able to run the same
migrations (as long as you don't use specific database fields).

Regards,

Andréas


Den ons 12 juni 2019 kl 20:27 skrev Mohammad Etemaddar <
mohammad.etemad...@gmail.com>:

> Hey folks
> After uploading the app to the server, I got problems by local migrations
> in development. So deleted the migrations and local sqlite db (Server uses
> MySQL).
> After more development, uploaded the whole project to the server and
> overwrite the files. And typed migrate on server. I don't know what
> happened to the database. Some new tables seems to be created (or not). I
> got really confused with this situation. It is much confusing to get backup
> from server's data and then restore them back.
> What is your opinion?
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d050785c-3924-40cb-8c9c-2b878dda4ad5%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/d050785c-3924-40cb-8c9c-2b878dda4ad5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCcHqiW%2BScQ3TBJ3-OCaESu9MXj01J%3D3GFeWKfjZrnaFCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to