that call to appadmin is the same I recommended to "hit" manually. it's the
only controller that loads EVERY module, even if it's
conditional... It's a smart usage of cmdline though :-P
On Saturday, April 11, 2015 at 9:46:39 AM UTC+2, Pablo Angulo wrote:
>
>
> -BEGIN PGP SIGNED MES
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
El 09/04/15 a las 10:21, Niphlod escribió:
> another "caveat circumvented", another step in the good direction now the
> problem is only IF you
have conditional models.
I tried this and it triggered the migration on a conditional model:
python
another "caveat circumvented", another step in the good direction now
the problem is only IF you have conditional models.
On Thursday, April 9, 2015 at 10:01:17 AM UTC+2, Pablo Angulo wrote:
>
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> El 08/04/15 a las 20:58, Niphlod escribió:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
El 08/04/15 a las 20:58, Niphlod escribió:
> good too, but NEEDS to happen without lazy_tables ^_^
This is what I do:
db = DAL('mysql://web2pyuser:pass@localhost/database', migrate=migrate,
lazy_tables=(not migrate))
-BEGIN PGP SIGNATURE-
Ve
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
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_migrat
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 a
don't ever set migrate=True if not on the development server.
When you need it, set migrate=True, hit appadmin one time to let the
migration happen, then set it to False.
No need to waste CPU or I/O if you're in complete control of when
migrations need to happen.
--
Resources:
- http://web2py
8 matches
Mail list logo