[web2py] Re: MySql table already exists error

2011-12-30 Thread Thomas Dall'Agnese
I see, thanks for your help! Cheers, Thomas

[web2py] Re: MySql table already exists error

2011-12-30 Thread Massimo Di Pierro
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

Re: [web2py] Re: MySql table already exists error

2011-12-30 Thread Thomas Dall'Agnese
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..

[web2py] Re: MySql table already exists error

2011-12-30 Thread Massimo Di Pierro
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

[web2py] Re: MySql table already exists error

2011-12-30 Thread Thomas Dall'Agnese
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?