Auto migrate hosted apps

If I clone an app to my local machine and run it on the app server, I have the --auto-migrate option to ensure the data tables schema matches the content of anvil.yaml

Could we please have a similar facilty for apps hosted at anvil.works? Perhaps a ‘migrate data tables’ option in a menu somewhere?

This would be extremely usef when cloning apps or when I want the same code base but separate data tables.

(Bonus points if we could have a facilty in the ide to define the data tables content on anvil.yaml without actually creating the tables).

(Extra bonus points if we could do that in code too).

5 Likes

If you download the app as a single file, then import that file, this gives you separate tables. Or at least it did when I tried it two years ago.

@owen.campbell Oh yes, that would be useful indeed!

I’m bumping this because it’s now the only thing preventing me from having a fully automated CI/CD pipeline for anvil apps.

I’d really like to have something similar to alembic and I can envisage being able to write most of the code to do that already. The lack of a DDL equivalent is the only blocker now.

4 Likes