Database component of the elevation production system
Project description
Database component
Install all dependencies and extras with uv sync --all-extras.
Creating migrations
To create migrations modify database models first. Make sure to have the models imported in env.py by adding them into models.all module.
After models have been modified, run:
uv run alembic revision --autogenerate -m "Migration description" --rev-id="migration_id"
This command will generate a new migration file based on the changes made to the models.
Check the created migration file and make sure it is correct and remove Alembic autogenerated comments from the top and bottom of the functions. Remember to commit it in the repository.
Running migrations
To run migrations in development, in root of the project run:
docker-compose run --rm ansible
or make infra-full.
If you want to skip database initialization, just run make migrations.
In development, you can also run migrations manually by running:
uv run alembic upgrade head
But this does not run migrations to test databases.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pinta_db-0.1.0.tar.gz.
File metadata
- Download URL: pinta_db-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01839991df7e40d2dfe3982a1559e15c76f8ccad29b8b9b4b7c7996746a8f4a7
|
|
| MD5 |
7671bae18a5c85f6622025934854b8eb
|
|
| BLAKE2b-256 |
efca09302c9ddbe84dc9021110c5c65afe17b788219a8259c0d0b38739aeaf5e
|
File details
Details for the file pinta_db-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pinta_db-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccd94d02fa3c7f5c6f2682d2ff9c5fd264ba7b45bcd6c49fdb95346044bb7dd7
|
|
| MD5 |
bad611b731aaef5463b9505b826635ac
|
|
| BLAKE2b-256 |
7467746c3a0f77b79b791beb860ad0ae0252a64a028d35321ff4d23cce800861
|