Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-08 Thread Johann Spies
On 2 April 2015 at 13:00, Gael Princivalle gaelprinciva...@gmail.com wrote: Hi Philip. Using UUIDs make the db slower right? Why? On huge databases the indexing will be slower but queries should not be slower than systems not using uuid.

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-08 Thread Johann Spies
For a new application it's not a problem, but someone have an experience about converting tables from standard ID to GUID? Firstly: backup :) I have done some conversions in the past. If I remember correctly, I added an extra column (say 'uuid'), filled it with unique values, created foreign

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-08 Thread Gael Princivalle
Thanks Johann, Philip, really useful. I'll use GUID. For a new application it's not a problem, but someone have an experience about converting tables from standard ID to GUID? Il giorno mercoledì 8 aprile 2015 11:22:22 UTC+2, Philip Kilner ha scritto: Hi Johann, Thanks for jumping in - had

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-08 Thread Philip Kilner
Hi Johann, Thanks for jumping in - had missed the message. On 08/04/15 10:10, Johann Spies wrote: On 2 April 2015 at 13:00, Gael Princivalle gaelprinciva...@gmail.com mailto:gaelprinciva...@gmail.com wrote: Using UUIDs make the db slower right? Why? On huge databases the indexing will be

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-08 Thread Ron Chatterjee
Thats one of the reason I like starting database using database schema. That way someone can use the XML and it works for any database domain. Just some thoughts:-) On Wednesday, April 8, 2015 at 7:52:37 AM UTC-4, Johann Spies wrote: For a new application it's not a problem, but someone have

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-02 Thread Mirek Zvolský
But I don't understand, how is it possible? The id's stay same as in source database ---or--- web2py creates a mapping based on db model and changes foreign keys with primary keys together? Dne čtvrtek 2. dubna 2015 9:08:55 UTC+2 Gael Princivalle napsal(a): Well it's always a shame to see

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-02 Thread Mirek Zvolský
export the whole database to csv and import it through web2py, the integrity of the references will be preserved. What for magic...? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-02 Thread Johann Spies
On 31 March 2015 at 20:19, Gael Princivalle gaelprinciva...@gmail.com wrote: Thanks Ron but:with CSV export: auth_user_iduser 3 John 7 Sally And then you import your CSV file you will have: auth_user_iduser 1

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-02 Thread Gael Princivalle
Well it's always a shame to see that the answer was in the web2py book. So shame on me, and thanks to all. CSV all tables at once works perfectly. Il giorno giovedì 2 aprile 2015 08:39:42 UTC+2, Mirek Zvolský ha scritto: export the whole database to csv and import it through web2py, the

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-02 Thread Philip Kilner
Hi Mirek, On 02/04/15 09:35, Mirek Zvolský wrote: But I don't understand, how is it possible? The id's stay same as in source database ---or--- web2py creates a mapping based on db model and changes foreign keys with primary keys together? New IDs are assigned, so links (e.g. FKs) will be

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-02 Thread Gael Princivalle
Hi Philip. Using UUIDs make the db slower right? http://simononsoftware.com/how-to-store-uuids-in-postgresql/ And you can't store a record like that: my_record = db.my_table(1) Il giorno giovedì 2 aprile 2015 10:52:20 UTC+2, Philip Kilner ha scritto: Hi Mirek, On 02/04/15 09:35, Mirek

[web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-01 Thread Ron Chatterjee
Here is the link he was referring to: https://groups.google.com/forum/#!searchin/web2py-developers/sqlite$20postgres/web2py-developers/QxeJNByj6qc/cpBHsa1ymUkJ On Tuesday, March 31, 2015 at 3:25:29 PM UTC-4, Willoughby wrote: I was referring to the script from Alan Etkin in your first post.

[web2py] Re: Cloning SQLlite into PostgreSQL

2015-03-31 Thread Ron Chatterjee
As an alrenative. you can upload a csv file into web2py. Not a solution if you want to do things dynamically and all the time. But you can use the csv option. On Tuesday, March 31, 2015 at 4:11:18 AM UTC-4, Gael Princivalle wrote: Hello. Like a lot of users I need to clone an existing

[web2py] Re: Cloning SQLlite into PostgreSQL

2015-03-31 Thread Willoughby
Well it has a bunch of log statements, were all of those OK? On Tuesday, March 31, 2015 at 2:19:41 PM UTC-4, Gael Princivalle wrote: Thanks Ron but:with CSV export: auth_user_iduser 3 John 7 Sally And then you import your

[web2py] Re: Cloning SQLlite into PostgreSQL

2015-03-31 Thread Gael Princivalle
I'm sorry Willoughby but I don't understand your question. With this csv export/import the problem is that id's change. For example if you take a look to the auth_user table in my previous post, table auth_membership will have wrong auth_user id's: auth_membership.id

[web2py] Re: Cloning SQLlite into PostgreSQL

2015-03-31 Thread Willoughby
I was referring to the script from Alan Etkin in your first post. It logs every step - what did the log steps say when you ran it? On Tuesday, March 31, 2015 at 3:19:13 PM UTC-4, Gael Princivalle wrote: I'm sorry Willoughby but I don't understand your question. With this csv export/import

[web2py] Re: Cloning SQLlite into PostgreSQL

2015-03-31 Thread Gael Princivalle
Thanks Ron but:with CSV export: auth_user_iduser 3 John 7 Sally And then you import your CSV file you will have: auth_user_iduser 1 John 2 Sally And so all