This also should work...
Before pushing the code create a file using touch databases/
forcemigrate
In db.py:
import os.path
db = DAL(....migrate_enabled=os.path.exists('databases/forcemigrate')
Then in the last model file xxx_cleanup.py
if os.path.exists('databases/forcemigrate'): os.remove('databases/
forcemigrate')
On Oct 20, 9:55 am, Massimo Di Pierro <[email protected]>
wrote:
> Store in a file the date of your model file and check. When thy change
> migrate and update files
>
> On Oct 20, 6:52 am, Cliff <[email protected]> wrote:
>
>
>
> > I have migrate=False on my production server.
>
> > Any thoughts on the best way to toggle migrate to True, then
> > immediately back when upgrading the model?
>
> > As the application and user base grow I don't want to be manually
> > editing table defs every time I change the model.