The *.table files include metadata about the tables for use with the 
migrations functionality. If the *.table file is missing and migrations are 
turned on, web2py will assume the associated table needs to be created 
(resulting in an error if it already exists). Probably you simply want to 
turn off migrations in the production environment.

Anthony

On Monday, August 31, 2015 at 9:00:38 PM UTC-4, James McGlynn wrote:
>
>
> class 'psycopg2.ProgrammingError' relation "my_table" already exists
>
> I have configured my app so that I can set a flag to use either a local 
> sqlite db, or a remote Heroku db when running locally, but when running 
> remotely on Heroku, the Heroku db is always used. The databases do not 
> contain the same data, nor do I need/want them to. 
>
> I have come across this error a few times now for different reasons. I'm 
> pretty comfortable with resolving it at this point, but one way I 
> consistently get the error is by creating a new table while developing 
> locally with sqlite and then pushing my changes to Heroku, without first 
> running locally with the postgresql db.
>
> Can someone explain why my app seems to need a .table file for the new 
> table to be pushed to heroku, even though it gets eventually removed by 
> Heroku anyway? Does the logic for the storing metadata in the db use the 
> .table files in the filesystem to create the metadata stored in the db the 
> first time it senses that its running on Heroku or something?
>
> How would this work on a platform like elasticbeanstalk, which doesn't 
> offer the luxury of having the files on the file system temporarily 
> available after a push. 
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to