You can never be too careful with a production db, so I would
recommend doing all migrations manually.
I suggest for example inserting a line which tests for your local
environment, and then use that to make sure all migrations are turned
off when deployed elsewhere. For example, something like this in
db.py:
mig = request.env.http_host == '127.0.0.1:8000' or False
db.define_table(...,
migrate = mig)
If we use some code to check the environment, we can never migrate by
mistake. I am interested to hear what others think.
Regards, D
On Feb 24, 11:07 pm, Carlos <[email protected]> wrote:
> Hi Massimo,
>
> I'm wondering if you can add the proposed safety switch for those migrations
> that involve data loss (delete and convert fields)?.
>
> I'm defining some tables and fields dynamically and this will be an
> important protection.
>
> Maybe add a new 'migrate' boolean argument in Field?.
>
> Does it make sense?.
>
> Thanks,
>
> Carlos