Sorry Clemens,
I hadn't checked your link correctly, it states it clearly with pseudo code
how the flags work.
Thanks, Jon.

if DAL.migrate_enabled and table.migrate:
   if DAL.fake_migrate_all or table.fake_migrate:
       perform fake migration
   else:
       perform migration


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Tue, Dec 8, 2020 at 9:48 AM Jon Subscripted <jonsubscripti...@gmail.com>
wrote:

> Hi Clemens,
> Just some quick questions.
>
> 1) What happens with auth tables and python -S <appname> -M -P?  it does
> not seem to create the .table files
> 2) Regarding migration and fake migration. I tried to summarize my
> understanding in the table below (use a fixed width font to see it
> properly). How does web2py behave on the cases marked with '?' in the table
> below?
> 3) I also assume from what I read in the book that define_table migration
> flags override those from db.py DAL constructor call. Is this correct?
>
> Thanks, Jon.
>                         FAKE_MIGRATE
>                      TRUE      FALSE
>                 +-----------+-------------+
>                 |           | changes     |
>           TRUE  |     ?     | in DB &     |
>                 |           | .table files|
> MIGRATE         +-------------------------+
>           FALSE |NO changes |             |
>                 |in DB, just|     ?       |
>                 |in .table  |             |
>                 +-----------+-------------+
>
> On Tue, Dec 8, 2020 at 9:22 AM Clemens <clemens.odend...@claret-clover.de>
> wrote:
>
>> Hello Jon,
>>
>> yes, this should do it. It's also fine to import an export of an existing
>> DB. But you can just start your application, this should create the .table
>> files at the first, I think.
>>
>> Regards
>> Clemens
>>
>> P.S.: Concerning migrate and fake_migrate options have a look there:
>> http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#table_migrations
>> I usually just use migrate=True, if I'm working on the models on my
>> development system. On production I use migrate=False and lazy_tables=True.
>>
>> On Tuesday, December 8, 2020 at 8:38:50 AM UTC+1 Jonsubs wrote:
>>
>>> Thanks Clemens and Jim S.
>>>
>>> So I guess that I should use the "python web2py.py -M -S <appname>"
>>> command option to create the new table files, right?
>>>
>>> On Mon, Dec 7, 2020 at 8:54 PM Clemens <clemens....@claret-clover.de>
>>> wrote:
>>>
>>>> Please try *not* to use the .table files. You can just rename database
>>>> folder to database.orig and create a new database folder in your
>>>> application directory. This is necessary since on the "new machine" there
>>>> are new databases created, I guess. Have a try. If it's solve the problem
>>>> you can easily recover the old database directory with the original .table
>>>> files.
>>>>
>>>> Regards
>>>> Clemens
>>>>
>>>> On Monday, December 7, 2020 at 2:04:15 PM UTC+1 Jonsubs wrote:
>>>>
>>>>> Hi all,
>>>>> I want to change the main repo copy from which I work but when I do it
>>>>> I'm not longer capable of modifying the database. BTW the old and new repo
>>>>> are not in the same machine.
>>>>>
>>>>> *My "sql.log" and every ".table" file are uploaded to the repo.
>>>>> *The old repo has migrations enabled (both in db.py and table
>>>>> definitions).
>>>>> *The new repo has migrations disabled and fake migrations enabled
>>>>> (both in db.py and table definitions).
>>>>>
>>>>> I want to be able to change the DB from the new repo (in the new
>>>>> machine). How can I change my database changing repo? Which are the steps
>>>>> to follow?
>>>>> Thanks, Jon.
>>>>>
>>>> --
>>>> 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 web2py+un...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/web2py/43dc5ec9-2a60-4460-8911-ba00f8d699c5n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/web2py/43dc5ec9-2a60-4460-8911-ba00f8d699c5n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>> 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 web2py+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/web2py/cafa5ecb-a8a5-4492-afbc-9316d5d29addn%40googlegroups.com
>> <https://groups.google.com/d/msgid/web2py/cafa5ecb-a8a5-4492-afbc-9316d5d29addn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz30myvWg7eopdYo5htb_Rr3jhyX%2Bf7Q%3D3Ci6%3DyzvwTu3_g%40mail.gmail.com.

Reply via email to