Best way to switch from mysql to postgres?

50 views
Skip to first unread message

anton

unread,
May 11, 2016, 3:17:08 PM5/11/16
to django...@googlegroups.com
hi,

I have a django (1.8.13) project running
on windows 7 64 bit + python 2.7.10 (32bit).

Actually it runs with mysql (precise: mariadb)
and I tried the following:

1. commandline:> manage.py dumpdata -o dumpdata.json

2. then I switch the engine to postgres in my django settings file
(the empty postgres is already prepared)

3. commandline:> manage.py loaddata dumpdata.json

Unfortunately it runs into an error.

Before I put here all the details, first one question:

Is this way supposed to work?

Or how would you do it?

Thanks

Anton

John Griebel

unread,
May 11, 2016, 3:23:58 PM5/11/16
to django...@googlegroups.com
What is the error you are getting?

Gergely Polonkai

unread,
May 11, 2016, 4:15:01 PM5/11/16
to Django users

Hello,

this depends on a lot of factors, like the anatomy of your models and signals. I have a model which is is not administered, but every time I create a user, a new row is added by a signal. This way, loading such a dump is impossible without some modifications to these signals.

All in all, it would be really helpful if you show us you actual errors. Without that it is impossible to decide if it is possible in your situation.

Best,
Gergely


 Anton

--
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...@googlegroups.com.
To post to this group, send email to django...@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/nh00dn%24hj7%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Eugene Gavrish

unread,
May 12, 2016, 12:25:20 PM5/12/16
to Django users, ant...@gmx.de
> the empty postgres is already prepared

What do you mean? What about "syncdb" or "migrate" ?

Bets regards,
Eugene

среда, 11 мая 2016 г., 22:17:08 UTC+3 пользователь anton написал:
Reply all
Reply to author
Forward
0 new messages