Bases: PumCustomBaseModel
PumModel holds some PUM specifics.
Attributes:
| Name |
Type |
Description |
module |
str
|
Name of the module being managed.
|
migration_table_schema |
str | None
|
Name of schema for the migration table. The table will always be named pum_migrations.
|
minimum_version |
Version | None
|
Minimum required version of PUM.
|
Source code in pum/config_model.py
| class PumModel(PumCustomBaseModel):
"""
PumModel holds some PUM specifics.
Attributes:
module: Name of the module being managed.
migration_table_schema: Name of schema for the migration table. The table will always be named `pum_migrations`.
minimum_version: Minimum required version of PUM.
"""
model_config = {"arbitrary_types_allowed": True}
module: str = Field(..., description="Name of the module being managed")
migration_table_schema: str | None = Field(
default="public", description="Name of schema for the migration table"
)
minimum_version: Version | None = Field(
default=None,
description="Minimum required version of pum.",
)
@model_validator(mode="before")
def parse_minimum_version(cls, values):
min_ver = values.get("minimum_version")
if isinstance(min_ver, str):
values["minimum_version"] = Version(min_ver)
return values
|