Skip to content

Commit

Permalink
Update database docs, lock
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout committed Oct 3, 2024
1 parent 6ec052c commit 4d0448e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 39 deletions.
13 changes: 5 additions & 8 deletions docs/1.getting-started/5.database.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ DipDup officially supports SQLite, PostgreSQL and TimescaleDB as a database engi
| SQL scripts | 🟢 | 🟢 | 🟢 |
| Immune tables | ⚠️ | 🟢 | 🟢 |
| Hasura integration | 🔴 | 🟢 | 🟢 |
| Migrations | 🔴 | 🟢 | 🟢 |

By default, DipDup uses an in-memory SQLite database that is destroyed after the process exits.

Expand Down Expand Up @@ -127,15 +128,11 @@ For more information visit the official TimescaleDB documentation:

## Migrations

DipDup supports database migrations leveraging Tortoise ORM migration package, `aerich`.
The migration files are stored in the `migrations` directory in the project root.

!!! Note
The database migrations feature is optional and is disabled by default. To enable it, you need to install `aerich`, which is available in the `[migrations]` optional dependencies group.
::banner{type="note"}
The database migrations feature is optional and is disabled by default. To enable it, you need to install `aerich`, which is available in the `[migrations]` optional dependencies group.
::

!!! Warning
- **Migrations are not supported in SQLite.**
- **Migrations are not supported if you use multiple databases in the same project.**
DipDup supports database migrations with [aerich](https://github.com/tortoise/aerich), a Tortoise ORM migration tool. The migration files are stored in the `migrations` directory in the project root.

DipDup provides a set of commands to manage databasek migrations:

Expand Down
55 changes: 28 additions & 27 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ aiolimiter==1.1.0
aiosignal==1.3.1
aiosqlite==0.20.0
annotated-types==0.7.0
anyio==4.4.0
anyio==4.6.0
appdirs==1.4.4
apscheduler==3.10.4
argcomplete==3.5.0
Expand Down Expand Up @@ -60,8 +60,8 @@ parsimonious==0.10.0
pathspec==0.12.1
platformdirs==4.2.2
poseidon-py==0.1.5
prometheus-client==0.20.0
pycryptodome==3.20.0
prometheus-client==0.21.0
pycryptodome==3.21.0
pydantic-core==2.23.4
pydantic[email]==2.9.2; python_version ~= "3.11"
pyhumps==3.8.0
Expand Down Expand Up @@ -97,6 +97,6 @@ tzdata==2024.1; platform_system == "Windows"
tzlocal==5.2
urllib3==2.2.2
uvloop==0.20.0
web3==7.2.0
web3==7.3.0
websockets==12.0
yarl==1.9.5

0 comments on commit 4d0448e

Please sign in to comment.