From 8d9264e8db52cecd182c29495df24e8051d3660f Mon Sep 17 00:00:00 2001 From: Brian Wiborg Date: Sat, 27 Sep 2025 05:00:58 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20more=20info=20on=20migrati?= =?UTF-8?q?ons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 17334dd..489ab8a 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,21 @@ Similar to Django, first run: ohmyapi makemigrations [ ] # no app means all INSTALLED_APPS ``` -And the apply your migrations via: +This will create a `migrations/` folder in you project root. + +``` +myproject/ + - myapp/ + - __init__.py + - models.py + - routes.py + - migrations/ + - myapp/ + - pyproject.toml + - settings.py +``` + +Apply your migrations via: ``` ohmyapi migrate [ ] # no app means all INSTALLED_APPS @@ -139,6 +153,7 @@ ohmyapi shell ## Authentication A builtin auth app is available. + Simply add `ohmyapi_auth` to your INSTALLED_APPS and define a JWT_SECRET in your `settings.py`. Remember to `makemigrations` and `migrate` for the auth tables to be created in the database.