Expand description
The migration commands behind cargo typedpg migrate, shared with the
TypeScript CLI (typedpg migrate, in typedpg_ts), which configures
them from typedpg.config.json instead of Cargo.toml, and
cargo typedpg lint (lint).
Modules§
- lint
cargo typedpg lint: the same report as the TypeScript CLI’stypedpg lint, built from thesql!andcopy_in!invocations of a Rust crate and the migrations its[package.metadata.typedpg]config names.
Enums§
Functions§
- connect
- Connect honoring the URL’s
sslmodeas libpq does:disableis plain,requireis TLS or nothing, andprefer(the default) tries TLS and falls back to a plain connection when that attempt fails — for instance on a server that does not offer TLS, or when the TLS handshake itself fails. - create_
migration - Write an empty
<timestamp>_<name>.sqland its.down.sqlindir; returns the two paths. - run_
migrate_ action - Run
action(any butCreate, which needs no connection) with the runner settingsconfig. - unchanged_
from_ ref - The files among
fileswhose content is identical to their version at git refreference(--ignore-migrations-from).