Create Data Tables with Code

I believe this ties in with

Copy Data Tables Structure With Optional Data

and

Cloning apps and data tables for Production and Development Apps

If you back up (save) an entire app to a .yaml file, it is relatively easy to extract the database schema (database structure definition), as Anvil sees it, as of the time of the backup, from that file. (Note: file format subject to change without notice!) This will at least give you a reliable reference, a checklist, so to speak, to use while you’re creating/modifying the tables and columns manually.

I agree, in the long run, more automation would be extremely helpful. Manual operations of this nature are notoriously error-prone. Automation should go both ways: write and read the schema.

1 Like