El viernes, 12 de diciembre de 2014 11:13:34 UTC-3, Niphlod escribió:
>
> nope, can't reproduce the issue. Something very weird is going on on your
> development system.
>
I tell you, I did the following: I uninstalled all ports (I have *FreeBSD
10.1*) and installed the minimum to run web2py (*Python 2.7.8*).
I downloaded the stable version of web2py [Version *2.9.11-stable*
+timestamp.2014.09.15.23.35.11]
I make a new application [pruebamigrate]. The only thing I change is
models/db.py adding (uses sqlite3):
db.define_table('mi_tabla',
Field('f1', 'integer'),
Field('f2', 'integer'),
Field('f3', 'integer'),
Field('f4', 'integer'),
migrate='mi_tabla.table'
)
*First run* of the model. It works well.
Modify the model. I add the field f5
db.define_table('mi_tabla',
Field('f1', 'integer'),
Field('f2', 'integer'),
Field('f3', 'integer'),
Field('f4', 'integer'),
Field('f5', 'integer'),
migrate='mi_tabla.table'
)
Run the model for the *second* time. It works well.
Run the model for the *third* time. Fails:
*OperationalError: duplicate column name: f5*
/databases/sql.log:
timestamp: 2014-12-14T17:59:08.227055
ALTER TABLE mi_tabla ADD f5 INTEGER;
success!
timestamp: 2014-12-14T17:59:11.707248
ALTER TABLE mi_tabla ADD f5 INTEGER;
timestamp: 2014-12-14T17:59:17.399771
ALTER TABLE mi_tabla ADD f5 INTEGER;
timestamp: 2014-12-14T17:59:19.971339
ALTER TABLE mi_tabla ADD f5 INTEGER;
timestamp: 2014-12-14T19:52:07.329072
ALTER TABLE mi_tabla ADD f5 INTEGER;
Then I downloaded the trunk version (Version
*2.10.0-beta*+timestamp.2014.10.16.15.58.50).
Doing the same steps all works correctly.
Works as expected.
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.