docs: Add basic readme
This commit is contained in:
parent
b0577624e1
commit
5dc6267cfc
25
README.md
25
README.md
@ -1,26 +1,13 @@
|
|||||||
# RatBot
|
# RatBot
|
||||||
|
|
||||||
```
|
Create database
|
||||||
alembic init alembic
|
|
||||||
```
|
|
||||||
|
|
||||||
In alembic.ini, configure the database URL:
|
|
||||||
```ini
|
|
||||||
sqlalchemy.url = sqlite:///./test.db
|
|
||||||
```
|
|
||||||
|
|
||||||
`albemic/env.py`
|
|
||||||
```python
|
|
||||||
from models import Base
|
|
||||||
target_metadata = Base.metadata
|
|
||||||
```
|
|
||||||
|
|
||||||
**Make migrations**
|
|
||||||
```zsh
|
```zsh
|
||||||
alembic revision --autogenerate -m "Create model XYZ"
|
ibot migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
**Migrate**
|
Run server
|
||||||
```zsh
|
```zsh
|
||||||
alembic upgrade head
|
ibot runserver
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Put images in `media/consume/`
|
||||||
|
Loading…
Reference in New Issue
Block a user