Migrations

Public surface of the alchemiq migrations package.

class alchemiq.migrations.Migration[source]

Bases: object

Base for a ClickHouse migration. Subclass and set revision/down_revision + up/down.

up(op)[source]

Record forward migration operations on op.

Parameters:

op (Operations)

Return type:

None

down(op)[source]

Record rollback operations on op.

Parameters:

op (Operations)

Return type:

None

exception alchemiq.migrations.MigrationError[source]

Bases: PersistenceError

A migrations operation failed (config, autogenerate, apply, or rollback).

exception alchemiq.migrations.MigrationConfigError[source]

Bases: MigrationError

Missing or invalid [tool.alchemiq] config, or an unresolved ${ENV} reference.