Re: [web2py] Bug With CSV Export and import

2012-10-12 Thread Richard Vézina
This could help you : If you want to do it manually (if you dataset is not so big and you can rapidly check the data integrity) : http://sqlite.phxsoftware.com/forums/p/941/4725.aspx Not recommended Or "automatically" first answer: http://stackoverflow.com/questions/18671/quick-easy-way-to-migrat

Re: [web2py] Bug With CSV Export and import

2012-10-12 Thread Hassan Alnatour
Dear Richerd , am moving my database from sqlite to mysql, what is the best way ? and keeping the ids the same regards, On Friday, October 12, 2012 9:44:59 PM UTC+3, Richard wrote: > > Depending of your backend, for example with postgres : > > pg_dump --attribute-inserts > --file=/whereYouW

Re: [web2py] Bug With CSV Export and import

2012-10-12 Thread Richard Vézina
Depending of your backend, for example with postgres : pg_dump --attribute-inserts --file=/whereYouWantToPutTheFile/"dbName_with_inserts_commands_and_blobs_dump_"`date +"%Y-%m-%d_%H-%M-%S"`".gz" --compress=9 --role=roleName --username=postgres dbName >From the command line. Or you may also use p

Re: [web2py] Bug With CSV Export and import

2012-10-12 Thread Hassan Alnatour
Dear Massimo , The error is happening to all my applications , after i use the new web2py the login in all my websites start giving me the error massage i showed you , but when i use web2py 1.99.2 everything is working fine , so from where do you want me to start the search , now for the cs

Re: [web2py] Bug With CSV Export and import

2012-10-12 Thread Massimo Di Pierro
Any chance I see your application? It could be a bug in web2py but it could a bug in your app. I cannot say. On Friday, 12 October 2012 01:59:49 UTC-5, Hassan Alnatour wrote: > > Dear Massimo , > > i want to upgrade , but i have that problem with the login i told you > about , that we didnt sol

Re: [web2py] Bug With CSV Export and import

2012-10-11 Thread Hassan Alnatour
Dear Massimo , i want to upgrade , but i have that problem with the login i told you about , that we didnt solve yet !! Please Help me https://groups.google.com/forum/?hl=en&fromgroups=#!search/Login$20error$20in$20the$20new$20web2py/web2py/mfbktvZp9jQ/f4fvRke5NAAJ Best Regards, On Wednesd

Re: [web2py] Bug With CSV Export and import

2012-10-10 Thread Massimo Di Pierro
There are bugs in the export/import functions in 1.99.4. It is almost one year old. You should upgrade before we can help you. On Wednesday, 10 October 2012 01:58:26 UTC-5, Hassan Alnatour wrote: > > Dear Massimo, > > i have web2py > Version 1.99.4 (2011-12-14 14:46:14) stable > > i opend the d

Re: [web2py] Bug With CSV Export and import

2012-10-10 Thread hasan alnator
Dear Simon, What i use the ids in my tables so the ids changed , who can i export and import data in backup/restore mechanism as you said above ? can you give me an example ? regards, On Wed, Oct 10, 2012 at 1:58 AM, hasan alnator wrote: > Dear Massimo, > > i have web2py > Version 1.99.4 (201

Re: [web2py] Bug With CSV Export and import

2012-10-09 Thread hasan alnator
Dear Massimo, i have web2py Version 1.99.4 (2011-12-14 14:46:14) stable i opend the dal.py and this is what i have in there : def import_from_csv_file(self, ifile, id_map=None, null='', unique='uuid', *args, **kwargs): if id_map is None: id_map={} fo

Re: [web2py] Bug With CSV Export and import

2012-10-09 Thread Simon Lukell
In my experience you're better off using the native database backup/restore mechanism if you want to retain IDs. web2py's csv import keeps references but with new sequential IDs as long as you include all the relevant tables in the export. from memory, if you don't want the actual data of a ref

Re: [web2py] Bug With CSV Export and import

2012-10-09 Thread Massimo Di Pierro
Which version? it should be the default to do what you ask. In your gluon/dal.py def import_from_csv_file(self, ifile, id_map=None, null='', unique='uuid', *args, **kwargs): #if id_map is None: id_map={} is the third line commented or not? On Tuesday,

Re: [web2py] Bug With CSV Export and import

2012-10-09 Thread hasan alnator
Dear Massimo, *i used this to export from the first application : * def export(): db.export_to_csv_file(open('all10082012.csv', 'wb')) return locals() *and to import to the other application i use this :* def importcsv(): db.import_from_csv_file(open('all10082012.csv', 'rb'))

Re: [web2py] Bug With CSV Export and import

2012-10-09 Thread Massimo Di Pierro
I understand. It can be done but how depends on details. Do you use appadmin for import export or the API? Do you do it one table at the time or do you export import the whole db? On Tuesday, 9 October 2012 12:01:45 UTC-5, Hassan Alnatour wrote: > > Dear Massimo , > > what i want to do is , i ha

Re: [web2py] Bug With CSV Export and import

2012-10-09 Thread hasan alnator
Dear Massimo , what i want to do is , i have am moving a database using CSV and when i do that the Ids change , cuz its auto generated i think , what can i do to solve this problem , when i move my database the ids changes witch means that everything will change , how can i fix this problem ?

Re: [web2py] Bug With CSV Export and import

2012-10-09 Thread Massimo Di Pierro
Not sure I understand the problem. How would you like it to work? On Tuesday, 9 October 2012 10:17:50 UTC-5, Hassan Alnatour wrote: > > Dear ALL , > > i reviewed the CSV files the exports seems fine but when importing the > data the ids are the order of the data inserted , how can we fix this ?

Re: [web2py] Bug With CSV Export and import

2012-10-09 Thread hasan alnator
Dear ALL , i reviewed the CSV files the exports seems fine but when importing the data the ids are the order of the data inserted , how can we fix this ? Best Regards, Hasan alnatour On Tue, Oct 9, 2012 at 6:12 PM, Hassan Alnatour wrote: > Dear ALL , > > when exporting all the tables as CSV ,

[web2py] Bug With CSV Export and import

2012-10-09 Thread Hassan Alnatour
Dear ALL , when exporting all the tables as CSV , the csv changes the ids to the order of the recorders , this is now right , what can i do to fix this , i want to move the data with the same ids regards, --