I suspect the online docs is incorrect and fake_migrate does not work
without migrate. I need to double check.
Massimo
On Wednesday, 11 April 2012 19:40:17 UTC-5, Yarin wrote:
>
> Massimo, this worked and I was able to get everything restored- thanks.
> However I could use an explanation. Setting both migrate *and*fake_migrate to
> True is not something prescribed in the documentation nor
> is it intuitive- how/why does this work?
>
> On Wednesday, April 11, 2012 7:25:21 PM UTC-4, Massimo Di Pierro wrote:
>>
>> Can you true setting both migrate=True, fake_migrate_all=True? then call
>> appadmin. What happens?
>>
>> On Wednesday, 11 April 2012 17:05:14 UTC-5, Yarin wrote:
>>>
>>> I corrupted my web2py -myql mapping and am trying to rebuild the web2py
>>> database files from scratch.
>>>
>>> Starting point:
>>>
>>> - The mysql database tables already exist. Some tables were working
>>> correctly under the old mapping, and some were never mapped.
>>> - I've already deleted everything from the databases folder.
>>> - I've already cleared everything from the db.py file except the
>>> original code (auth tables, etc.)
>>>
>>> Plan:
>>>
>>>
>>> - Set migrate=False, fake_migrate_all=True at the DAL connection
>>> level:
>>> db = DAL('mysql://root:root@localhost/mydb',
>>> migrate=False,fake_migrate_all
>>> =True)
>>> - Re-add each table into the db.py file one by one, starting with a
>>> fake_migrate and then going to real migrate into all the tables were
>>> working.
>>>
>>> Problem:
>>>
>>>
>>> - I can't get any table files generated for anything, even the auth
>>> files. Setting fake_migrate_all=True doesn't generate any files, and
>>> setting migrate=True gives me an error that the tables already exist.
>>>
>>>
>>> How do I get the table files to generate?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>