I see, thanks for your help!
Cheers,
Thomas
Not quote. First, your model must exactly describe what is in the db.
Then you set fake_migrate=True, this will create the metadata. Then
you set fake_migrate=False (or remove it) and migrate=True. Not you
can change the model and web2py will perform the ALTER TABLE.
If web2py does not know what i
Indeed, I am talking about (3), and in that case, running with migrate=True
raises an error (table already exists).
The table had been created by web2py so of course it exists.
In case (3) should I also have fake_migrate=True?
On Sat, Dec 31, 2011 at 12:58 PM, Massimo Di Pierro <
massimo.dipie..
There are various scenarios:
1) the table exist in db but were not created by web2py
run at least once with migrate=True,fake_migrate=True
2) the table exist in db and where created by web2py (or you run
fake_migrate once)
it is ok to run with migrate=False
3) web2py is aware of the tables (create
But if we change the table definition, for example we add one field, it
will not be updated then, isn't it?
How can we migrate a MySQL table?
5 matches
Mail list logo