Re: Migrating from sqllite3 to postgres

2015-05-25 Thread Luis Zárate
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 
escribió:
>
>> On May 21, 2015, at 11:24 PM, jaspinder singh 
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
> rahmc...@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+unsubscr...@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+unsubscr...@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.


Re: Migrating from sqllite3 to postgres

2015-05-25 Thread Peter of the Norse

> On May 21, 2015, at 11:24 PM, jaspinder singh  
> 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
rahmc...@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+unsubscr...@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.


Re: Migrating from sqllite3 to postgres

2015-05-23 Thread Babatunde Akinyanmi
Or
Create a new postgres database, transfer the data to it, verify its
correctness then change your settings file to point to the postgres
database.
On 22 May 2015 09:59, "Gergely Polonkai"  wrote:

> I will also have to do this in the near future (same reason), and already
> have some untested ideas. My guess is to add a second database in
> settings.DATABASES, fetch all the model instances from my original db and
> save them in the other. But if anyone has a better solution, let us know!
> On 22 May 2015 09:19, "jaspinder singh" 
> 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
>>
>> --
>> 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 http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/7fc71178-9609-42c2-8c39-e6c5d132ffdc%40googlegroups.com
>> 
>> .
>> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACczBULGjE0OW3yCNZrRtOQS0JRXjryNGgLB7wzeuiATYSNS9Q%40mail.gmail.com
> 
> .
> 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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXMqE_9RqWP2QRF41HJVmVEvn69F%2BTPAURiAgFEpTGC4sQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Migrating from sqllite3 to postgres

2015-05-22 Thread Gergely Polonkai
I will also have to do this in the near future (same reason), and already
have some untested ideas. My guess is to add a second database in
settings.DATABASES, fetch all the model instances from my original db and
save them in the other. But if anyone has a better solution, let us know!
On 22 May 2015 09:19, "jaspinder singh"  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
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7fc71178-9609-42c2-8c39-e6c5d132ffdc%40googlegroups.com
> 
> .
> 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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACczBULGjE0OW3yCNZrRtOQS0JRXjryNGgLB7wzeuiATYSNS9Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Migrating from sqllite3 to postgres

2015-05-22 Thread jaspinder singh
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

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7fc71178-9609-42c2-8c39-e6c5d132ffdc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.