rlsbl v0.42.0 /rlsbl.targets.pgdesign
On this page

Pgdesign release target for projects using pgdesign to manage PostgreSQL database schemas, with version tracking in pgdesign.toml.

#rlsbl.targets.pgdesign

#rlsbl.targets.pgdesign

Pgdesign release target for projects using pgdesign to manage database schemas, with version tracking in pgdesign.toml.

#PgdesignTarget

Release target for pgdesign database schema projects.

Detects pgdesign.toml in the project root or schema/ subdirectory. Version is stored in [project] version within pgdesign.toml. On release, validates the schema and generates migrations if configured.

#name

python
def name(self)

#detect

python
def detect(self, dir_path)

True if pgdesign.toml exists in root or schema/ subdir.

#_toml_path

python
def _toml_path(self, dir_path)

Resolve the actual path to pgdesign.toml.

#_schema_dir

python
def _schema_dir(self, dir_path)

Resolve the directory containing pgdesign.toml.

#read_name

python
def read_name(self, dir_path)

Return the directory name as the project name.

#read_metadata

python
def read_metadata(self, dir_path)

Pgdesign projects have no standard metadata beyond version.

#read_version

python
def read_version(self, dir_path)

Read version from pgdesign.toml [project].version.

#write_version

python
def write_version(self, dir_path, version)

Update [project].version in pgdesign.toml using tomlkit round-trip.

Returns a list of relative file paths (relative to dir_path) that were modified.

#version_file

python
def version_file(self)

#build

python
def build(self, dir_path, version)

Validate the pgdesign schema. Fails the release if errors exist.

#template_vars

python
def template_vars(self, dir_path)

Extract template variables.