Hi - 

I am trying to do some work with a database that is set-up in web2py. I am 
able to connect to the db server from my script but I have essentially 
tried to do exactly the same in my external routine as in web2py and it is 
giving me this error:
pydal.contrib.pg8000.errors.ProgrammingError: ('ERROR', '42P07', 'relation 
"episode_table" already exists')

I had assumed that I needed to setup the table in the same way with …

db = DAL('postgres://webpydbuser:[email protected]/temporary', 
check_reserved=['all'], folder=PATH_TO_DATABASE_FILES)
episode_table = db.define_table('episode_table',
                                Field('episode_id','string',10, required=True, 
unique=True, notnull=True),
                                Field('modification_date', 'date', ),
                                Field('scheduled_archive_date', 'date',),
                                Field('archive_status', 'string', 10, 
default='scheduled',)
                                )


I have found some references to needing an external .tables files in web2py 
that tracks which tables are in the db instance but I can't dig up any 
documentation that suggests how to retreive a table from a db connection 
without defining it first.

Any suggestions or links to documentation that I have missed?

Thanks

Tom

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to