Do NOT add or delete fields now. Make sure you have your models as
they were when the .table were there working.

The exact command to fix migrations depends on the version. If you
have the latest web2py

DAL(...,fake_migrate_all=True)

will rebuild the .table.

After you remove fake_migrate_all=True you can add or remove fields.


On May 3, 4:26 pm, pbreit <pbreitenb...@gmail.com> wrote:
> I am having trouble getting a column added to a Postgres table. Have I made
> an unrecoverable error in deleting the *.table files without backing up? Is
> there any way to recover short of dropping the DB? I can regenerate the
> /table files of course but are they incompatible with the existing DB?
>
> I have tried various combinations of migrate, fake_migrate, migrate_enabled
> and fake_migrate_all set to True/False. I'm not sure what these do exactly
> and how and when to use them.
>
> Is it OK to add a new Field() in the middle or do I need to add it at the
> end?
>
> Would one solution be to manually edit my DB so that it matches sql.log?
>
> Also, can someone suggest a strategy for what to hgignore in the databases
> directory? I currently am ignoring *.table and storage.sqlite locally and
> databases/* on my servers. Does that sound right?

Reply via email to