📝 Add mkdocs

This commit is contained in:
Brian Wiborg 2025-10-02 00:49:53 +02:00
parent a3d9862c4e
commit 91baf968d7
No known key found for this signature in database
10 changed files with 498 additions and 380 deletions

22
docs/migrations.md Normal file
View file

@ -0,0 +1,22 @@
# Migrations
OhMyAPI uses [Aerich](https://github.com/tortoise/aerich) - a database migrations tool for TortoiseORM.
## Making migrations
Whenever you add, remove or change fields of a database model, you need to create a migration for the change.
```
ohmyapi makemigrations [ <app> ] # no app indicates all INSTALLED_APPS
```
This will create a `migrations/` directory with subdirectories for each of your apps.
## Migrating
When the migrations are create, they need to be applied:
```
ohmyapi migrate [ <app> ] # no app indicates all INSTALLED_APPS
```