coder-rust-sqlx-config

<skill_overview> Configure SQLx safely and consistently across environments

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "coder-rust-sqlx-config" with this command: npx skills add ozerohax/assistagents/ozerohax-assistagents-coder-rust-sqlx-config

<skill_overview> Configure SQLx safely and consistently across environments

Setting up a database pool Adding or running migrations Configuring database URLs and features Bootstrapping DB on startup

SQLx GitHub

</skill_overview>

Use a single shared pool for the app lifetime Configure max connections based on DB limits Store the pool in app state and reuse it

let pool = sqlx::PgPool::connect(&database_url).await?;

Use DATABASE_URL from environment, never hardcode creds Enable only the database and runtime features you need Fail fast if the database is unreachable at startup

Generate migrations with sqlx migrate add Keep migrations in a dedicated migrations/ directory Apply migrations via sqlx migrate run or migrate! at startup In production, apply migrations in a controlled step

sqlx::migrate!("./migrations").run(&pool).await?;

Use separate databases for dev, test, and prod Never run destructive migrations against prod by default

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

coder-csharp-aspnetcore-api

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

coder-csharp-efcore-queries

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

coder-csharp-error-handling

No summary provided by upstream source.

Repository SourceNeeds Review