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 ha

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 forei

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 -

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 mailto:gaelprinciva...@gmail.com>> wrote: Using UUIDs make the db slower right? Why? On huge databases the indexing will be slower but queries shoul

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-08 Thread Johann Spies
On 2 April 2015 at 13:00, Gael Princivalle 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. > http://simononsoftware.com/how-to-store-uuids-in-postgresql/ > And you ca

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 Zv

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 mai

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 t

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-01 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) - https://code.google.com/p/web2py/i

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-01 Thread Johann Spies
On 31 March 2015 at 20:19, Gael Princivalle 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