Documentation
¶
Overview ¶
Command orm is the ORM's tool: it writes the generated code of a module's models and drives its migrations, Django's manage.py commands.
go run github.com/vuka-lang/orm/cmd/orm generate [dir] go run github.com/vuka-lang/orm/cmd/orm makemigrations [name] [--check] [--dry-run] [--empty] [--db name] go run github.com/vuka-lang/orm/cmd/orm migrate [target] [--db name] go run github.com/vuka-lang/orm/cmd/orm showmigrations go run github.com/vuka-lang/orm/cmd/orm sqlmigrate <name> [--backwards] [--db name]
The migration commands run the program as their tool: its main package is built with an init overlaid that serves orm.ServeCLI before main runs (main never does), imports of its migrations packages, and the generated code orm generate would write, then run with the request in orm.CLIEnv. They connect by URL (orm.ConnectURL): --database name=URL, else DATABASE_URL for the default database and DATABASE_URL_<NAME> for another. The program links the drivers it opens (orm/postgres, …). A module with .vuka files is built through vuka gen (the vuka command, or $VUKA).