pub async fn ensure_schema(
pool: &PgPool,
table_name: &str,
) -> Result<(), OutboxError>Expand description
Apply the canonical Postgres outbox schema to the target database.
Intended for POCs, integration tests and local development.
Production deployments should run their own migration tooling against the
SQL rendered by Dialect::schema_ddl. Applying DDL from the running
application typically requires elevated privileges that the runtime role
should not own, and clashes with versioned migration workflows.
ยงErrors
OutboxError::Internaliftable_nameis not a valid identifier.OutboxError::Databaseif the connection or the DDL statement fails.