Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pinta_db-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pinta_db-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

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

Hashes for pinta_db-0.1.0.tar.gz
Algorithm Hash digest
SHA256 01839991df7e40d2dfe3982a1559e15c76f8ccad29b8b9b4b7c7996746a8f4a7
MD5 7671bae18a5c85f6622025934854b8eb
BLAKE2b-256 efca09302c9ddbe84dc9021110c5c65afe17b788219a8259c0d0b38739aeaf5e

See more details on using hashes here.

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

Hashes for pinta_db-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ccd94d02fa3c7f5c6f2682d2ff9c5fd264ba7b45bcd6c49fdb95346044bb7dd7
MD5 bad611b731aaef5463b9505b826635ac
BLAKE2b-256 7467746c3a0f77b79b791beb860ad0ae0252a64a028d35321ff4d23cce800861

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page