mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-10 03:04:36 +00:00

* chore: replace `dotenv` with `dotenvy` The former appears to be unmaintained and the latter is a drop-in replacement. * chore: fix all warnings
TODOs Example
Setup
-
Declare the database URL
export DATABASE_URL="postgres://postgres:password@localhost/todos"
-
Create the database.
$ sqlx db create
-
Run sql migrations
$ sqlx migrate run
Usage
Add a todo
cargo run -- add "todo description"
Complete a todo.
cargo run -- done <todo id>
List all todos
cargo run