Monday, May 25, 2015

Re: Migrating from sqllite3 to postgres

Mmm probably you are looking for export /import data in django.

For export :
python manage.py dumpdata --format=json myapp > data.json

For import:
python manage.py loaddata data.json

See

https://docs.djangoproject.com/en/1.8/ref/django-admin/#loaddata-fixture-fixture

El lunes, 25 de mayo de 2015, Peter of the Norse <RahmCoff@radio1190.org> escribió:
>
>> On May 21, 2015, at 11:24 PM, jaspinder singh <jaspindersingh83@gmail.com> wrote:
>>
>> I have developed an app using sqllite. But my Heroku doesn't support sqllite and the data keeps leaking every 24 hours. Can someone list the steps how to change from sqllite3 to postgres
>>
>
>
> From sqlite:
> sqlite> .output backup.sql
> sqlite> .dump
>
> From the command line:
> $ psql django_db -1f backup.sql
>
> You may have to edit the .sql file to make it work. Good luck.
>
> Peter of the Norse
> RahmCoff@Radio1190.org
>
>
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/53FD5433-F4CA-4684-9BF5-E9FA4EA786C4%40Radio1190.org.
> For more options, visit https://groups.google.com/d/optout.
>

--
"La utopía sirve para caminar" Fernando Birri



--
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAG%2B5VyONP3Cw%2BKrGYd%2BzLVcNrCBEr1YH3eW6PhOY7UMsYZN1wQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment