good too, but NEEDS to happen without lazy_tables ^_^ On Wednesday, April 8, 2015 at 9:42:25 AM UTC+2, mcm wrote: > > The following is a trick that gives little overhead and make migration > happen when needed. > > python web2py.py -S your_app -M -R script.py -A --do-migrate > > script.py can be empty or do anything you like... > > then in db.py > > import sys > if '--do-migrate' in sys.args: > do_migrate = True > else: > do_migrate = False > > db = DAL(...., migrate=do_migrate,...) > > > > 2015-04-08 0:03 GMT+02:00 <[email protected] <javascript:>>: > >> El martes, 7 de abril de 2015, 17:53:14 (UTC+2), Niphlod escribió: >>> >>> When you need it, set migrate=True, hit appadmin one time to let the >>> migration happen, then set it to False. >>> >> >> How about using >> >> python web2py.py -S your_app -M >> >> instead of hitting appadmin? The reason is that I disable the app while >> upgrading, and the above command triggers the migration even with the app >> in maintenance. >> >> Niphlod, what would happen if you get a request for your app after you >> have upgraded the code but before you hit appadmin? Is an error ticket the >> worst-case scenario? >> >> I use a procedure very similar to Kevin, I guess I read the same thread! >> >> -- >> 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] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > >
-- 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.

