Hi
Versión
2.9.11-stable+timestamp.2014.09.15.23.35.11
(Ejecutando en Rocket 1.2.6, Python 2.7.8)
I have the following:
db = DAL('postgres://usr:psw@localhost/mi_db', pool_size=10,
check_reserved=['all'])
db.define_table('mi_tabla',
Field('f1', 'integer'),
Field('f2', 'integer'),
Field('f3', 'integer'),
Field('f4', 'integer'),
migrate='mi_tabla.table'
)
Run the model for the first time. /databases/mi_tabla.table file is created
Now I remove a field
db.define_table('mi_tabla',
Field('f1', 'integer'),
#Field('f2', 'integer'),
Field('f3', 'integer'),
Field('f4', 'integer'),
migrate='mi_tabla.table'
)
Run the model again (without error). Inspecting the table in the database.
The f2 field was removed correctly.
In the next model run (request from the browser) the error occurs:
*ProgrammingError: column "f2" of relation "mi_tabla" does not exist*
I add fake_migrate to DAL:
db = DAL('postgres://usr:psw@localhost/mi_db', pool_size=10,
check_reserved=['all'], *fake_migrate_all=True*)
Now the model is run properly. The file xxx is modified (as I expected),
but modifications continue with each peticioón, and the file is growing.
Then I remove the DAL fake_migrate, but the error reappears:
*ProgrammingError: column "f2" of relation "mi_tabla" does not exist.*
I'm still in development, but reviewing files * .table had more than 250MB.
What I understood is that after the first request with fake_migrate = True,
the problem is solved and then you can remove the DAL fake_migrate
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.