No project description provided
Project description
nucliadb
This module contains most of the Python components for NucliaDB:
- ingest
- reader
- writer
- search
- train
NucliaDB Migrations
This module is used to manage NucliaDB Migrations.
All migrations will be provided in the migrations
folder and have a filename
that follows the structure: [sequence]_[migration name].py
.
Where sequence
is the order the migration should be run in with zero padding.
Example: 0001_migrate_data.py
.
Each migration should have the following:
from nucliadb.migrator.context import ExecutionContext
async def migrate(context: ExecutionContext) -> None:
"""
Non-kb type of migration. Migrate global data.
"""
async def migrate_kb(context: ExecutionContext, kbid: str) -> None:
"""
Migrate kb.
Must have both types of migrations.
"""
How migrations are managed
-
All migrations utilize a distributed lock to prevent simulateously running jobs
-
Global migration state:
- current version
- target version
- KBs to migrate
-
KB Migration State:
- current version
-
Migrations are currently run with a deployment and will be continuously retried on failure.
-
Running migrations in a deployment is to make sure a migration does not prevent code deployment.
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 Distributions
Built Distribution
Hashes for nucliadb-2.27.0.post782-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fa9d13107d5edee66a5a7d9842e8cd7381c1e8ad6fd5cea5b9b3f3d5c171ccc |
|
MD5 | 8a05aa995a0b69c233a4dc53aede8d55 |
|
BLAKE2b-256 | 7b062e0194507b259e7d3f7d000c910e60941fab4ddc55f94b658e0633b9c114 |