You have to use get_db.
Heroku has a non-reliable file system. It can be be reset at any time. By
default web2py stores metadata about tables on the filesystem so if it is
reset the information is lost and web2py thinks your table do not exist.
get_db configures DAL for you to store all metadat
I am not using get_db.
I am just using DAL and retrieving the database connection string from an
environment variable.
db = DAL(os.environ['DATABASE_URL'], pool_size=10)
Even though I am just doing this, my app works fine on Heroku until I add a
new table definition to my model file and git pu
Hmm, looks like that should work automatically if you're using the Heroku
contrib module to connect to your db. Are you doing:
from gluon.contrib.heroku import get_db
db = get_db(name=None, pool_size=10)
Anthony
On Tuesday, September 1, 2015 at 11:48:27 PM UTC-4, James McGlynn wrote:
>
> Thank
Thanks for the response!
I was able to find documentation on how web2py stores metadata in *.table
files. So I understand what you are saying about them, and I agree that
turning off migrations when running remotely would get rid of the error.
But my question was about how/when web2py decides
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
5 matches
Mail list logo