Commencer pars installer le cli de sqlx
Refer a cette exemple
$ cargo install sqlx-cli --no-default-features --features native-tls,postgres
run postgres
docker run --name postgresql-container -p 5432:5432 -e POSTGRES_PASSWORD=somePassword -d postgres
export DATABASE_URL="postgres://postgres:somePassword@localhost:5432/postgres"
$ sqlx db create
sqlx migrate run