I have the following scenario and am wondering how others are handling it.
I have a dev and prod environment that I'm working with. They exist on different servers. In my dev environment I have migrate turned on for all tables. In prod they are turned off.
I use mercurial for source control and do NOT move my web2py/applications/databases directory contents from dev to prod.
I have reports that are called from my web2py apps in which I'd like to use the DAL instead of straight SQL. I get my db connection using the following:
db = DAL('%s' % (infoCenterUtil.getDalString()),
folder='%s/%s' % (infoCenterUtil.getWeb2pyRoot(),
infoCenterUtil.getDalDbDir()),
auto_import=True)
...where my infoCenterUtil get functions return the proper strings/directories for the DAL connection.
This works fine on my development machine but fails on production with errors referencing fields that I used to have in my db but are no longer there. Since there are no references to these fields in the current source I can only surmise that these names are coming from the files in the /databases directory of my prod installation, which are out of date because I have migrations off and do not bring that directory over when syncing dev to prod.
So, I'm looking for input on how others handle this situation. Is this bad practice? I'd really like to get this working because of the simplicity of working with the DAL but if I have to go back to SQL it won't be the end of the world.
Can anyone elaborate on how they would manage this?
Thanks!
-Jim