Versioned GeoGenius schema migrations for host applications.
Host migrations pin both the target version and the PostgreSQL prefix.
Summary
Functions
Inspects an installed schema's version, contract marker, signatures, and capabilities.
Returns the content-addressed identity of the schema contract shipped by this package.
Returns the current migration version supported by this library.
Rolls back migrations to the target version.
Returns the installed GeoGenius schema version for prefix, read directly
through repo.
Returns the currently migrated version from the database.
Renders a deterministic SQL transition for hosts that do not run Ecto migrations.
Returns the explicit capabilities required by the current schema contract.
Applies migrations up to the target version.
Functions
Inspects an installed schema's version, contract marker, signatures, and capabilities.
@spec current_contract_revision() :: String.t()
Returns the content-addressed identity of the schema contract shipped by this package.
@spec current_version() :: pos_integer()
Returns the current migration version supported by this library.
@spec down(keyword()) :: :ok
Rolls back migrations to the target version.
Options
:prefix- Schema prefix. Defaults to"geo_genius".:version- Target version to roll back to. Defaults to0.
@spec installed_version(module(), String.t()) :: non_neg_integer()
Returns the installed GeoGenius schema version for prefix, read directly
through repo.
Unlike migrated_version/1 (usable only from inside an active
Ecto.Migration run, since it resolves its repo from the migration
process), this takes an explicit repo and works from ordinary application
or mix task code.
Returns 0 if GeoGenius has not been installed at prefix.
@spec migrated_version(keyword()) :: non_neg_integer()
Returns the currently migrated version from the database.
Returns 0 if no migrations have been applied.
Renders a deterministic SQL transition for hosts that do not run Ecto migrations.
@spec required_capabilities() :: [String.t()]
Returns the explicit capabilities required by the current schema contract.
@spec up(keyword()) :: :ok
Applies migrations up to the target version.
Options
:prefix- Schema prefix. Defaults to"geo_genius".:version- Target version. Defaults to2.