[web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-28 Thread Mark Graves
Still have not figured this out. Trying a different approach, but I suspect it was Massimo's hunch. If I locally upload the files without and uploadfs, then I s3sync the files up to my s3bucket and set the uploadfs to that bucket after, will web2py find them automatically? I know i could dig i

[web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-26 Thread Anthony
I'm not sure if this will help, but have you tried dropping (and re-creating) the tables rather than truncating them before doing the inserts? Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google

[web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-26 Thread Massimo Di Pierro
not sure what the problem is. Pydal gets the id of the last inserted record from the adapter which gets it from pgsql. It does not keep its own count. So it is pgsql that is returning the same id. I noticed that you have: try: result = db.citation.validate_and_insert(**_citation) print result

Re: [web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-26 Thread Johann Spies
What is the output of \d+ in psql? What does your model in web2py for that model look like? Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://

[web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-25 Thread Mark Graves
Code available @ https://github.com/gravesmedical/migration Its just a series of scripts that gets run in the order they are in the scripts directory. -Mark On Sunday, November 22, 2015 at 8:58:05 PM UTC-6, Mark Graves wrote: > > Are there any caveats to know about running applications in she

Re: [web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-25 Thread Mark Graves
I tried both, unfortunately. Working on posting the code right now -Mark On Wed, Nov 25, 2015 at 12:41 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > very strange. Are you using psycopg2 or pg8000? I do not trust the latter. > > > On Tuesday, 24 November 2015 12:42:44 UTC-6, Mark

Re: [web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-25 Thread Massimo Di Pierro
very strange. Are you using psycopg2 or pg8000? I do not trust the latter. On Tuesday, 24 November 2015 12:42:44 UTC-6, Mark Graves wrote: > > I'm using postgres, migrating from latin-1 mysql. > > Its a referenced table, and yes I definitely am calling db.commit() > > I will post the entire code t

Re: [web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-24 Thread Mark Graves
I'm using postgres, migrating from latin-1 mysql. Its a referenced table, and yes I definitely am calling db.commit() I will post the entire code tonight. Also, I have ~11k legacy documents to upload to S3 which I wanted to make available via a uniform method. I was previously attempting to ins

[web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-23 Thread Anthony
What does the code look like? Are you calling db.commit() at any point? On Sunday, November 22, 2015 at 9:58:05 PM UTC-5, Mark Graves wrote: > > Are there any caveats to know about running applications in shell mode > (e.g. transactions / returning id)? > > I'm running a middleware migration scri