El miércoles, 10 de diciembre de 2014 16:54:17 UTC-3, Niphlod escribió:
>
> BTW, what you are experiencing is totally predictable, but you're "barking
> at the wrong tree".
>
> now:
> migrate=True, fake_migrate=False
>
I start with a database empty.
db = DAL('postgres://usr:psw@localhost/sisteq2', pool_size=10,
check_reserved=['all'], *migrate=True, fake_migrate_all=False*)
my model:
>
> db.define_table('mi_tabla',
> Field('f1', 'integer'),
> Field('f2', 'integer'),
> Field('f3', 'integer'),
> Field('f4', 'integer'),
> migrate='mi_tabla.table'
> )
>
>
>
> all is fine.
>
Ok. First execution model, creates the table in the database. So far so
normal. (When I say "run the model" I mean to make a request from the
browser)
> now + 1:
>
> db.define_table('mi_tabla',
> Field('f1', 'integer'),
> # Field('f2', 'integer'),
> Field('f3', 'integer'),
> Field('f4', 'integer'),
> migrate='mi_tabla.table'
> )
>
>
>
> f2 is removed from the table.
>
Second execution model. All right, the field is removed from the table.
Third execution. *Fails*
ProgrammingError: column "f2" of relation "mi_tabla" does not exist
Is everything I did. DAL continued as it was originally:
db = DAL('postgres://usr:psw@localhost/sisteq2', pool_size=10,
check_reserved=['all'], *migrate=True, fake_migrate_all=False*)
José
--
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.