module

Prostore::Steps::Codec

Serialize/deserialize Steps::Kind::* values to and from JSON for persistence in prostore_migration_step.params (ADR-0009 invariant 2: plan-at-start, never recompute on resume).

Each step round-trips losslessly: the encoded form contains every primitive needed to re-execute, so the deserialized step yields identical DDL on retry. No Symbols are ever stored — everything is String-keyed JSON, which is why Schema::Field.name and the column arrays on indexes/FKs are typed as String at the schema model level.

Instance methods

decode(kind : String, params_json : String) : Kind::Any
Source
decode_definition(j : JSON::Any) : Schema::Definition
Source
decode_field(j : JSON::Any) : Schema::Field
Source
decode_foreign_key(j : JSON::Any) : Schema::ForeignKey
Source
decode_index(j : JSON::Any) : Schema::Index
Source
encode(step : Kind::Any) : NamedTuple(kind: String, params: String)
Source
encode_definition(d : Schema::Definition) : String
Source
encode_field(f : Schema::Field)
Source
encode_foreign_key(fk : Schema::ForeignKey)
Source
encode_index(i : Schema::Index)
Source