Module

data.schema.types

Schema types — frozen dataclasses for schema snapshots.

Classes

ColumnSchema 5
A single column in a table.

A single column in a table.

Attributes

Name Type Description
name str
type str
nullable bool
default str | None
primary_key bool
IndexSchema 4
A database index.

A database index.

Attributes

Name Type Description
name str
table str
columns tuple[str, ...]
unique bool
ForeignKey 3
A foreign key constraint.

A foreign key constraint.

Attributes

Name Type Description
column str
ref_table str
ref_column str
TableSchema 3
Schema for a single table.

Schema for a single table.

Attributes

Name Type Description
name str
columns dict[str, ColumnSchema]
foreign_keys tuple[ForeignKey, ...]
SchemaSnapshot 2
Complete database schema snapshot.

Complete database schema snapshot.

Attributes

Name Type Description
tables dict[str, TableSchema]
indexes dict[str, IndexSchema]