On 20/02/2015 3:07 AM, Tom Lockhart wrote:
On Feb 18, 2015, at 11:04 PM, talex <bkielhor...@gmail.com> wrote:

I have a functioning Django application that is based on sqlite3,
but I want to change to using Postgres.

I’ll point out for the benefit of others who might be getting started: 
Postgres is a full featured database and supports the full range of Django 
features and add-ons including GeoDjango. Starting development with a 
production-quality database already in place is not much more work and will 
save grief later on.

Usually I’d end with “hth†, but this is no help at all for talex…

- Tom


I agree with Tom.

You are looking for a pair of dump/load scripts. Check this post ...

http://stackoverflow.com/questions/4581727/convert-sqlite-sql-dump-file-to-postgresql

I haven't studied that SO post but at first glance it seems the sqlite dump file might be directly usable by postgres. If so, you need to create the new database in Postgres and load it from the sqlite dump file.

You need to look at the Postgres docs for psql which will load the sqlite3 data dump.

Here is an example I use regularly ...

psql --port=5432 --file=/home/mike/dumps/pg/ssds/pq3.dump --dbname=ssds --username=miked

hth

Mike

--
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/54E6740B.6070902%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

Reply via email to